import React from "react";
import { DataEditorAll as DataEditor } from "../../data-editor-all.js";
import { BeautifulWrapper, Description, 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) => (
Input blending can be enabled or disable between row, column, and range selections.
Multi-selections can also be enabled or disabled with the same level of granularity.
}>
),
],
};
interface InputBlendingGridProps {
rangeBlending: "mixed" | "exclusive";
columnBlending: "mixed" | "exclusive";
rowBlending: "mixed" | "exclusive";
rangeMultiSelect: "none" | "cell" | "rect" | "multi-cell" | "multi-rect";
columnMultiSelect: "none" | "single" | "multi";
rowMultiSelect: "none" | "single" | "multi";
}
export const InputBlending: React.FC = p => {
const { cols, getCellContent } = useMockDataGenerator(30);
return (
);
};
(InputBlending as any).args = {
rangeBlending: "mixed",
columnBlending: "mixed",
rowBlending: "mixed",
rangeMultiSelect: "rect",
columnMultiSelect: "multi",
rowMultiSelect: "multi",
};
(InputBlending as any).argTypes = {
rangeBlending: {
control: { type: "select" },
options: ["mixed", "exclusive"],
},
columnBlending: {
control: { type: "select" },
options: ["mixed", "exclusive"],
},
rowBlending: {
control: { type: "select" },
options: ["mixed", "exclusive"],
},
rangeMultiSelect: {
control: { type: "select" },
options: ["none", "cell", "rect", "multi-cell", "multi-rect"],
},
columnMultiSelect: {
control: { type: "select" },
options: ["none", "single", "multi"],
},
rowMultiSelect: {
control: { type: "select" },
options: ["none", "single", "multi"],
},
};