@dxos/react-ui-grid 0.8.0 → 0.8.1-main.013e445

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
1
  import { type Extension } from '@codemirror/state';
2
- import { type KeyboardEvent } from 'react';
2
+ import React, { type KeyboardEvent } from 'react';
3
3
  import { type UseTextEditorProps } from '@dxos/react-ui-editor';
4
4
  import { type GridEditBox } from '../Grid';
5
5
  export type EditorKeyEvent = Pick<KeyboardEvent<HTMLInputElement>, 'key'> & {
@@ -21,5 +21,5 @@ export type CellEditorProps = {
21
21
  } & Pick<UseTextEditorProps, 'autoFocus'> & {
22
22
  onBlur?: EditorBlurHandler;
23
23
  };
24
- export declare const CellEditor: ({ value, extension, autoFocus, onBlur, box, gridId }: CellEditorProps) => import("react/jsx-runtime").JSX.Element;
24
+ export declare const CellEditor: ({ value, extension, autoFocus, onBlur, box, gridId }: CellEditorProps) => React.JSX.Element;
25
25
  //# sourceMappingURL=CellEditor.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"CellEditor.d.ts","sourceRoot":"","sources":["../../../../src/CellEditor/CellEditor.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAEnD,OAAc,EAAE,KAAK,aAAa,EAAE,MAAM,OAAO,CAAC;AAGlD,OAAO,EACL,KAAK,kBAAkB,EAKxB,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,SAAS,CAAC;AAE3C,MAAM,MAAM,cAAc,GAAG,IAAI,CAAC,aAAa,CAAC,gBAAgB,CAAC,EAAE,KAAK,CAAC,GAAG;IAAE,KAAK,CAAC,EAAE,OAAO,CAAA;CAAE,CAAC;AAEhG,MAAM,MAAM,gBAAgB,GAAG,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,EAAE,KAAK,EAAE,cAAc,KAAK,IAAI,CAAC;AAC1F,MAAM,MAAM,iBAAiB,GAAG,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,KAAK,IAAI,CAAC;AACpE,MAAM,MAAM,sBAAsB,GAAG,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,EAAE,KAAK,CAAC,EAAE,cAAc,KAAK,IAAI,CAAC;AAEjG,MAAM,MAAM,eAAe,GAAG;IAC5B,OAAO,EAAE,gBAAgB,CAAC;IAC1B,KAAK,CAAC,EAAE,gBAAgB,CAAC;CAC1B,CAAC;AAGF,eAAO,MAAM,UAAU,uBAAwB,eAAe,KAAG,SAgFhE,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG;IAC5B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,GAAG,CAAC,EAAE,WAAW,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,GAAG,IAAI,CAAC,kBAAkB,EAAE,WAAW,CAAC,GAAG;IAAE,MAAM,CAAC,EAAE,iBAAiB,CAAA;CAAE,CAAC;AAE3E,eAAO,MAAM,UAAU,yDAA0D,eAAe,4CA4C/F,CAAC"}
1
+ {"version":3,"file":"CellEditor.d.ts","sourceRoot":"","sources":["../../../../src/CellEditor/CellEditor.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAEnD,OAAO,KAAK,EAAE,EAAE,KAAK,aAAa,EAAE,MAAM,OAAO,CAAC;AAGlD,OAAO,EACL,KAAK,kBAAkB,EAKxB,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,SAAS,CAAC;AAE3C,MAAM,MAAM,cAAc,GAAG,IAAI,CAAC,aAAa,CAAC,gBAAgB,CAAC,EAAE,KAAK,CAAC,GAAG;IAAE,KAAK,CAAC,EAAE,OAAO,CAAA;CAAE,CAAC;AAEhG,MAAM,MAAM,gBAAgB,GAAG,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,EAAE,KAAK,EAAE,cAAc,KAAK,IAAI,CAAC;AAC1F,MAAM,MAAM,iBAAiB,GAAG,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,KAAK,IAAI,CAAC;AACpE,MAAM,MAAM,sBAAsB,GAAG,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,EAAE,KAAK,CAAC,EAAE,cAAc,KAAK,IAAI,CAAC;AAEjG,MAAM,MAAM,eAAe,GAAG;IAC5B,OAAO,EAAE,gBAAgB,CAAC;IAC1B,KAAK,CAAC,EAAE,gBAAgB,CAAC;CAC1B,CAAC;AAGF,eAAO,MAAM,UAAU,uBAAwB,eAAe,KAAG,SAgFhE,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG;IAC5B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,GAAG,CAAC,EAAE,WAAW,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,GAAG,IAAI,CAAC,kBAAkB,EAAE,WAAW,CAAC,GAAG;IAAE,MAAM,CAAC,EAAE,iBAAiB,CAAA;CAAE,CAAC;AAE3E,eAAO,MAAM,UAAU,yDAA0D,eAAe,sBA4C/F,CAAC"}
@@ -1,7 +1,8 @@
1
+ import React from 'react';
1
2
  import { type CellEditorProps } from './CellEditor';
2
3
  import { type GridScopedProps, type DxGridCellIndex } from '../Grid';
3
4
  export type GridCellEditorProps = GridScopedProps<Pick<CellEditorProps, 'extension' | 'onBlur'> & {
4
5
  getCellContent: (index: DxGridCellIndex) => string | undefined;
5
6
  }>;
6
- export declare const GridCellEditor: ({ extension, getCellContent, onBlur, __gridScope }: GridCellEditorProps) => import("react/jsx-runtime").JSX.Element | null;
7
+ export declare const GridCellEditor: ({ extension, getCellContent, onBlur, __gridScope }: GridCellEditorProps) => React.JSX.Element | null;
7
8
  //# sourceMappingURL=GridCellEditor.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"GridCellEditor.d.ts","sourceRoot":"","sources":["../../../../src/CellEditor/GridCellEditor.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAc,KAAK,eAAe,EAAE,MAAM,cAAc,CAAC;AAChE,OAAO,EAAE,KAAK,eAAe,EAAkB,KAAK,eAAe,EAAE,MAAM,SAAS,CAAC;AAErF,MAAM,MAAM,mBAAmB,GAAG,eAAe,CAC/C,IAAI,CAAC,eAAe,EAAE,WAAW,GAAG,QAAQ,CAAC,GAAG;IAAE,cAAc,EAAE,CAAC,KAAK,EAAE,eAAe,KAAK,MAAM,GAAG,SAAS,CAAA;CAAE,CACnH,CAAC;AAEF,eAAO,MAAM,cAAc,uDAAwD,mBAAmB,mDAqBrG,CAAC"}
1
+ {"version":3,"file":"GridCellEditor.d.ts","sourceRoot":"","sources":["../../../../src/CellEditor/GridCellEditor.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAsB,MAAM,OAAO,CAAC;AAE3C,OAAO,EAAc,KAAK,eAAe,EAAE,MAAM,cAAc,CAAC;AAChE,OAAO,EAAE,KAAK,eAAe,EAAkB,KAAK,eAAe,EAAE,MAAM,SAAS,CAAC;AAErF,MAAM,MAAM,mBAAmB,GAAG,eAAe,CAC/C,IAAI,CAAC,eAAe,EAAE,WAAW,GAAG,QAAQ,CAAC,GAAG;IAAE,cAAc,EAAE,CAAC,KAAK,EAAE,eAAe,KAAK,MAAM,GAAG,SAAS,CAAA;CAAE,CACnH,CAAC;AAEF,eAAO,MAAM,cAAc,uDAAwD,mBAAmB,6BAqBrG,CAAC"}
@@ -34,7 +34,7 @@ type GridRootProps = PropsWithChildren<{
34
34
  onEditingChange: (nextEditing: GridEditing) => void;
35
35
  }>>;
36
36
  declare const GridRoot: {
37
- ({ id, editing: propsEditing, defaultEditing, onEditingChange, children, __gridScope, }: GridScopedProps<GridRootProps>): import("react/jsx-runtime").JSX.Element;
37
+ ({ id, editing: propsEditing, defaultEditing, onEditingChange, children, __gridScope, }: GridScopedProps<GridRootProps>): React.JSX.Element;
38
38
  displayName: string;
39
39
  };
40
40
  type GridContentProps = Omit<ComponentProps<typeof DxGrid>, 'onEdit'> & {
@@ -44,7 +44,7 @@ type GridContentProps = Omit<ComponentProps<typeof DxGrid>, 'onEdit'> & {
44
44
  declare const GridContent: React.ForwardRefExoticComponent<Omit<GridScopedProps<GridContentProps>, "ref"> & React.RefAttributes<NaturalDxGrid>>;
45
45
  export declare const Grid: {
46
46
  Root: {
47
- ({ id, editing: propsEditing, defaultEditing, onEditingChange, children, __gridScope, }: GridScopedProps<GridRootProps>): import("react/jsx-runtime").JSX.Element;
47
+ ({ id, editing: propsEditing, defaultEditing, onEditingChange, children, __gridScope, }: GridScopedProps<GridRootProps>): React.JSX.Element;
48
48
  displayName: string;
49
49
  };
50
50
  Content: React.ForwardRefExoticComponent<Omit<GridScopedProps<GridContentProps>, "ref"> & React.RefAttributes<NaturalDxGrid>>;
@@ -1,16 +1,10 @@
1
1
  import '@dxos-theme';
2
- import { type StoryObj } from '@storybook/react';
2
+ import { type Meta, type StoryObj } from '@storybook/react';
3
3
  import { type GridContentProps, type GridRootProps } from './Grid';
4
- export { defaultSizeCol, defaultSizeRow } from '@dxos/lit-grid';
5
- type StoryGridProps = GridContentProps & Pick<GridRootProps, 'onEditingChange'>;
6
- declare const _default: {
7
- title: string;
8
- component: ({ onEditingChange, ...props }: StoryGridProps) => import("react/jsx-runtime").JSX.Element;
9
- decorators: import("@storybook/react").Decorator[];
10
- parameters: {
11
- layout: string;
12
- };
13
- };
14
- export default _default;
15
- export declare const Basic: StoryObj<StoryGridProps>;
4
+ type GridStoryProps = GridContentProps & Pick<GridRootProps, 'onEditingChange'>;
5
+ declare const meta: Meta<GridStoryProps>;
6
+ export default meta;
7
+ type Story = StoryObj<typeof meta>;
8
+ export declare const Basic: Story;
9
+ export declare const SingleColumn: Story;
16
10
  //# sourceMappingURL=Grid.stories.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Grid.stories.d.ts","sourceRoot":"","sources":["../../../../src/Grid/Grid.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,aAAa,CAAC;AAErB,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AASjD,OAAO,EAAQ,KAAK,gBAAgB,EAAE,KAAK,aAAa,EAAE,MAAM,QAAQ,CAAC;AAEzE,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAEhE,KAAK,cAAc,GAAG,gBAAgB,GAAG,IAAI,CAAC,aAAa,EAAE,iBAAiB,CAAC,CAAC;;;+CAiB9B,cAAc;;;;;;AAiEhE,wBAKE;AAEF,eAAO,MAAM,KAAK,EAAE,QAAQ,CAAC,cAAc,CA+B1C,CAAC"}
1
+ {"version":3,"file":"Grid.stories.d.ts","sourceRoot":"","sources":["../../../../src/Grid/Grid.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,aAAa,CAAC;AAErB,OAAO,EAAE,KAAK,IAAI,EAAE,KAAK,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAS5D,OAAO,EAA0B,KAAK,gBAAgB,EAAE,KAAK,aAAa,EAAE,MAAM,QAAQ,CAAC;AAI3F,KAAK,cAAc,GAAG,gBAAgB,GAAG,IAAI,CAAC,aAAa,EAAE,iBAAiB,CAAC,CAAC;AAoFhF,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,cAAc,CAK9B,CAAC;AAEF,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,KAAK,EAAE,KA4CnB,CAAC;AAGF,eAAO,MAAM,YAAY,EAAE,KAqB1B,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dxos/react-ui-grid",
3
- "version": "0.8.0",
3
+ "version": "0.8.1-main.013e445",
4
4
  "description": "React component which manages a `dx-grid` Lit web component.",
5
5
  "homepage": "https://dxos.org",
6
6
  "bugs": "https://github.com/dxos/dxos/issues",
@@ -30,9 +30,9 @@
30
30
  "@radix-ui/react-context": "1.1.1",
31
31
  "@radix-ui/react-popper": "1.2.2",
32
32
  "@radix-ui/react-use-controllable-state": "1.1.0",
33
- "@dxos/lit-grid": "0.8.0",
34
- "@dxos/react-ui-editor": "0.8.0",
35
- "@dxos/util": "0.8.0"
33
+ "@dxos/lit-grid": "0.8.1-main.013e445",
34
+ "@dxos/util": "0.8.1-main.013e445",
35
+ "@dxos/react-ui-editor": "0.8.1-main.013e445"
36
36
  },
37
37
  "devDependencies": {
38
38
  "@types/react": "~18.2.0",
@@ -40,17 +40,17 @@
40
40
  "react": "~18.2.0",
41
41
  "react-dom": "~18.2.0",
42
42
  "vite": "5.4.7",
43
- "@dxos/random": "0.8.0",
44
- "@dxos/react-ui": "0.8.0",
45
- "@dxos/react-ui-searchlist": "0.8.0",
46
- "@dxos/react-ui-theme": "0.8.0",
47
- "@dxos/storybook-utils": "0.8.0"
43
+ "@dxos/random": "0.8.1-main.013e445",
44
+ "@dxos/react-ui": "0.8.1-main.013e445",
45
+ "@dxos/react-ui-searchlist": "0.8.1-main.013e445",
46
+ "@dxos/react-ui-theme": "0.8.1-main.013e445",
47
+ "@dxos/storybook-utils": "0.8.1-main.013e445"
48
48
  },
49
49
  "peerDependencies": {
50
50
  "react": "~18.2.0",
51
51
  "react-dom": "~18.2.0",
52
- "@dxos/react-ui": "0.8.0",
53
- "@dxos/react-ui-theme": "0.8.0"
52
+ "@dxos/react-ui-theme": "0.8.1-main.013e445",
53
+ "@dxos/react-ui": "0.8.1-main.013e445"
54
54
  },
55
55
  "publishConfig": {
56
56
  "access": "public"
@@ -4,41 +4,46 @@
4
4
 
5
5
  import '@dxos-theme';
6
6
 
7
- import { type StoryObj } from '@storybook/react';
7
+ import { type Meta, type StoryObj } from '@storybook/react';
8
8
  import React, { type MouseEvent, type MutableRefObject, useCallback, useRef, useState } from 'react';
9
9
 
10
10
  import { defaultSizeRow } from '@dxos/lit-grid';
11
11
  import { faker } from '@dxos/random';
12
12
  import { DropdownMenu } from '@dxos/react-ui';
13
- import { PopoverCombobox } from '@dxos/react-ui-searchlist';
13
+ import { PopoverCombobox, type PopoverComboboxRootProps } from '@dxos/react-ui-searchlist';
14
14
  import { withTheme } from '@dxos/storybook-utils';
15
15
 
16
- import { Grid, type GridContentProps, type GridRootProps } from './Grid';
16
+ import { Grid, type GridEditing, type GridContentProps, type GridRootProps } from './Grid';
17
17
 
18
- export { defaultSizeCol, defaultSizeRow } from '@dxos/lit-grid';
18
+ const storybookItems = faker.helpers.uniqueArray(faker.commerce.productName, 16);
19
19
 
20
- type StoryGridProps = GridContentProps & Pick<GridRootProps, 'onEditingChange'>;
20
+ type GridStoryProps = GridContentProps & Pick<GridRootProps, 'onEditingChange'>;
21
21
 
22
- const storybookItems = faker.helpers.uniqueArray(faker.commerce.productName, 16);
22
+ const GridStory = ({ initialCells, ...props }: GridStoryProps) => {
23
+ const triggerRef = useRef<HTMLButtonElement>(null) as MutableRefObject<HTMLButtonElement>;
23
24
 
24
- const storybookInitialCells = (value?: string) => ({
25
- grid: {
26
- '1,1': {
27
- accessoryHtml:
28
- '<button class="dx-button is-6 pli-0.5 min-bs-0 absolute inset-block-1 inline-end-1" data-story-action="menu"><svg><use href="/icons.svg#ph--arrow-right--regular"/></svg></button>',
29
- value: 'Weekly sales report',
30
- },
31
- '2,2': {
32
- accessoryHtml: `<dx-grid-multiselect-cell ${value ? `values='${JSON.stringify([{ label: value }])}'` : ''} placeholder="Select…"></dx-grid-multiselect-cell>`,
33
- },
34
- },
35
- });
25
+ const [cells, setCells] = useState<GridContentProps['initialCells']>(initialCells);
36
26
 
37
- const StoryGrid = ({ onEditingChange, ...props }: StoryGridProps) => {
38
- const [menuOpen, setMenuOpen] = useState(false);
27
+ const [editing, setEditing] = useState<GridEditing>(null);
28
+ const handleEditingChange = useCallback<NonNullable<GridRootProps['onEditingChange']>>((event) => {
29
+ // TODO(burdon): Not working?
30
+ setEditing(event ? { index: event.index, initialContent: '' } : null);
31
+ }, []);
32
+
33
+ // Multiselect
39
34
  const [popoverOpen, setPopoverOpen] = useState(false);
40
35
  const [multiSelectValue, setInternalMultiselectValue] = useState('');
41
- const triggerRef = useRef<HTMLButtonElement>(null) as MutableRefObject<HTMLButtonElement>;
36
+ const setMultiselectValue = useCallback<NonNullable<PopoverComboboxRootProps['onValueChange']>>((nextValue) => {
37
+ setInternalMultiselectValue(nextValue);
38
+ setCells((cells) => {
39
+ // TODO(burdon): How can we get the cell address to update?
40
+ console.log('[setMultiselectValue]', nextValue);
41
+ return cells;
42
+ });
43
+ }, []);
44
+
45
+ // Menu
46
+ const [menuOpen, setMenuOpen] = useState(false);
42
47
 
43
48
  const handleClick = useCallback((event: MouseEvent) => {
44
49
  const closestStoryAction = (event.target as HTMLElement).closest('button[data-story-action]');
@@ -50,27 +55,22 @@ const StoryGrid = ({ onEditingChange, ...props }: StoryGridProps) => {
50
55
  if (closestAccessory) {
51
56
  const action = closestAccessory.getAttribute('data-dx-grid-accessory');
52
57
  switch (action) {
53
- case 'invoke-multiselect':
58
+ case 'invoke-multiselect': {
54
59
  triggerRef.current = closestAccessory as HTMLButtonElement;
55
60
  return setPopoverOpen(true);
61
+ }
56
62
  }
57
63
  }
58
64
  }, []);
59
65
 
60
- const [initialCells, setInitialCells] = useState<GridContentProps['initialCells']>(storybookInitialCells());
61
-
62
- const setMultiselectValue = useCallback((nextValue: string) => {
63
- const nextInitialCells = storybookInitialCells(nextValue);
64
- console.log('[set initial cells]', nextInitialCells);
65
- setInitialCells(nextInitialCells);
66
- setInternalMultiselectValue(nextValue);
67
- }, []);
68
-
69
66
  return (
70
- <>
71
- <Grid.Root id='story' onEditingChange={onEditingChange}>
72
- <Grid.Content {...props} initialCells={initialCells} onClick={handleClick} />
67
+ <div role='none' className='fixed inset-0 grid'>
68
+ <Grid.Root id='story' editing={editing} onEditingChange={handleEditingChange}>
69
+ {/* TODO(burdon): Why is this property not just "cells" or "values" */}
70
+ <Grid.Content {...props} initialCells={cells} onClick={handleClick} />
73
71
  </Grid.Root>
72
+
73
+ {/* Menu */}
74
74
  <DropdownMenu.Root open={menuOpen} onOpenChange={setMenuOpen}>
75
75
  <DropdownMenu.VirtualTrigger virtualRef={triggerRef} />
76
76
  <DropdownMenu.Content>
@@ -78,6 +78,8 @@ const StoryGrid = ({ onEditingChange, ...props }: StoryGridProps) => {
78
78
  <DropdownMenu.Arrow />
79
79
  </DropdownMenu.Content>
80
80
  </DropdownMenu.Root>
81
+
82
+ {/* Multiselect */}
81
83
  <PopoverCombobox.Root
82
84
  open={popoverOpen}
83
85
  onOpenChange={setPopoverOpen}
@@ -95,18 +97,22 @@ const StoryGrid = ({ onEditingChange, ...props }: StoryGridProps) => {
95
97
  <PopoverCombobox.Arrow />
96
98
  </PopoverCombobox.Content>
97
99
  </PopoverCombobox.Root>
98
- </>
100
+ </div>
99
101
  );
100
102
  };
101
103
 
102
- export default {
104
+ const meta: Meta<GridStoryProps> = {
103
105
  title: 'ui/react-ui-grid/Grid',
104
- component: StoryGrid,
106
+ component: GridStory,
105
107
  decorators: [withTheme],
106
108
  parameters: { layout: 'fullscreen' },
107
109
  };
108
110
 
109
- export const Basic: StoryObj<StoryGridProps> = {
111
+ export default meta;
112
+
113
+ type Story = StoryObj<typeof meta>;
114
+
115
+ export const Basic: Story = {
110
116
  args: {
111
117
  id: 'story',
112
118
  columnDefault: {
@@ -130,11 +136,48 @@ export const Basic: StoryObj<StoryGridProps> = {
130
136
  4: { size: 270 },
131
137
  },
132
138
  },
139
+ initialCells: {
140
+ grid: {
141
+ '1,1': {
142
+ value: 'Demo decoration',
143
+ accessoryHtml: `
144
+ <button class="dx-button is-6 pli-0.5 min-bs-0 absolute inset-block-1 inline-end-1" data-story-action="menu">
145
+ <svg><use href="/icons.svg#ph--arrow-right--regular"/></svg>
146
+ </button>
147
+ `,
148
+ },
149
+ '2,1': {
150
+ // accessoryHtml: `<dx-grid-multiselect-cell ${value ? `values='${JSON.stringify([{ label: value }])}'` : ''} placeholder="Select…"></dx-grid-multiselect-cell>`,
151
+ accessoryHtml: '<dx-grid-multiselect-cell placeholder="Select…"></dx-grid-multiselect-cell>',
152
+ },
153
+ },
154
+ },
133
155
  onAxisResize: (event) => {
134
156
  console.log('[axis resize]', event);
135
157
  },
136
- onEditingChange: (event) => {
137
- console.log('[edit]', event);
158
+ },
159
+ };
160
+
161
+ // TODO(burdon): How to make single-column?
162
+ export const SingleColumn: Story = {
163
+ args: {
164
+ id: 'story',
165
+ limitColumns: 1,
166
+ columnDefault: {
167
+ grid: {
168
+ size: 180,
169
+ },
170
+ },
171
+ rowDefault: {
172
+ grid: {
173
+ size: defaultSizeRow,
174
+ resizeable: false,
175
+ },
176
+ },
177
+ columns: {
178
+ grid: {
179
+ 0: { size: 200 },
180
+ },
138
181
  },
139
182
  },
140
183
  };