import React from "react";
import { DataEditorAll as DataEditor } from "../../data-editor-all.js";
import {
BeautifulWrapper,
Description,
MoreInfo,
PropName,
useMockDataGenerator,
defaultProps,
} from "../../data-editor/stories/utils.js";
import { SimpleThemeWrapper } from "../../stories/story-utils.js";
export default {
title: "Glide-Data-Grid/DataEditor Demos",
decorators: [
(Story: React.ComponentType) => (
The data grid can handle paste automatically by returning true from{" "}
onPaste. You can also return false and handle paste yourself. If
paste is undefined the DataEditor will do its best to paste to the current cell.
Paste supports the copy format of Google Sheets and Excel. Below is an example of data
copied from excel with some escaped text.
>
}>
),
],
};
export const PasteSupport: React.VFC = () => {
const { cols, getCellContent, onColumnResize, setCellValue } = useMockDataGenerator(50, false);
return (
);
};