@progress/kendo-react-grid 9.0.0-develop.9 → 9.0.1-develop.1

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.
Files changed (51) hide show
  1. package/Grid.js +1 -1
  2. package/Grid.mjs +927 -1042
  3. package/GridNoRecords.js +1 -1
  4. package/GridNoRecords.mjs +7 -14
  5. package/GridToolbar.js +1 -1
  6. package/GridToolbar.mjs +23 -28
  7. package/VirtualScroll.js +1 -1
  8. package/VirtualScroll.mjs +53 -51
  9. package/VirtualScrollFixed.js +1 -1
  10. package/VirtualScrollFixed.mjs +16 -14
  11. package/cells/GridFilterCell.js +1 -1
  12. package/cells/GridFilterCell.mjs +99 -113
  13. package/columnMenu/GridColumnMenuCheckboxFilter.js +1 -1
  14. package/columnMenu/GridColumnMenuCheckboxFilter.mjs +132 -178
  15. package/columnMenu/GridColumnMenuFilter.js +1 -1
  16. package/columnMenu/GridColumnMenuFilter.mjs +123 -156
  17. package/columnMenu/GridColumnMenuFilterCell.js +1 -1
  18. package/columnMenu/GridColumnMenuFilterCell.mjs +42 -53
  19. package/columnMenu/GridColumnMenuFilterUI.js +1 -1
  20. package/columnMenu/GridColumnMenuFilterUI.mjs +15 -17
  21. package/columnMenu/GridColumnMenuGroup.js +1 -1
  22. package/columnMenu/GridColumnMenuGroup.mjs +29 -40
  23. package/columnMenu/GridColumnMenuItemContent.js +1 -1
  24. package/columnMenu/GridColumnMenuItemContent.mjs +7 -20
  25. package/columnMenu/GridColumnMenuItemGroup.js +1 -1
  26. package/columnMenu/GridColumnMenuItemGroup.mjs +7 -20
  27. package/columnMenu/GridColumnMenuSort.js +1 -1
  28. package/columnMenu/GridColumnMenuSort.mjs +42 -53
  29. package/dist/cdn/js/kendo-react-grid.js +1 -1
  30. package/drag/ColumnDraggable.js +1 -1
  31. package/drag/ColumnDraggable.mjs +34 -45
  32. package/drag/GroupingIndicator.js +1 -1
  33. package/drag/GroupingIndicator.mjs +51 -69
  34. package/footer/Footer.js +1 -1
  35. package/footer/Footer.mjs +40 -57
  36. package/header/FilterRow.js +1 -1
  37. package/header/FilterRow.mjs +70 -78
  38. package/header/GridHeaderSelectionCell.js +1 -1
  39. package/header/GridHeaderSelectionCell.mjs +28 -37
  40. package/header/GroupPanel.js +1 -1
  41. package/header/GroupPanel.mjs +43 -49
  42. package/header/Header.js +1 -1
  43. package/header/Header.mjs +70 -89
  44. package/index.d.mts +261 -725
  45. package/index.d.ts +261 -725
  46. package/index.js +1 -1
  47. package/index.mjs +78 -80
  48. package/package-metadata.mjs +1 -1
  49. package/package.json +11 -11
  50. package/rows/GridDetailRow.js +1 -1
  51. package/rows/GridDetailRow.mjs +2 -10
package/index.d.ts CHANGED
@@ -17,7 +17,6 @@ import { DataResult } from '@progress/kendo-data-query';
17
17
  import { DragClue } from '@progress/kendo-react-data-tools';
18
18
  import { DropClue } from '@progress/kendo-react-data-tools';
19
19
  import { FilterOperator } from '@progress/kendo-react-data-tools';
20
- import { ForwardRefExoticComponent } from 'react';
21
20
  import { getSelectedState } from '@progress/kendo-react-data-tools';
22
21
  import { getSelectedStateFromKeyDown } from '@progress/kendo-react-data-tools';
23
22
  import { GridClassStructure } from '@progress/kendo-react-common';
@@ -29,10 +28,8 @@ import { KendoReactComponentBaseProps } from '@progress/kendo-react-common';
29
28
  import { NavigatableSettings } from '@progress/kendo-react-data-tools';
30
29
  import { PagerProps } from '@progress/kendo-react-data-tools';
31
30
  import { PagerTargetEvent } from '@progress/kendo-react-data-tools';
32
- import PropTypes from 'prop-types';
33
31
  import * as React_2 from 'react';
34
32
  import { ReactElement } from 'react';
35
- import { RefAttributes } from 'react';
36
33
  import { setSelectedState } from '@progress/kendo-react-data-tools';
37
34
  import { SortDescriptor } from '@progress/kendo-data-query';
38
35
  import { SortSettings } from '@progress/kendo-react-data-tools';
@@ -41,7 +38,6 @@ import { SVGIcon } from '@progress/kendo-react-common';
41
38
  import { SVGIcon as SVGIcon_2 } from '@progress/kendo-svg-icons';
42
39
  import { TABLE_COL_INDEX_ATTRIBUTE } from '@progress/kendo-react-data-tools';
43
40
  import { TableDragSelectionReleaseEvent } from '@progress/kendo-react-data-tools';
44
- import { TableKeyboardNavigationContextType } from '@progress/kendo-react-data-tools';
45
41
  import { TableKeyDownEvent } from '@progress/kendo-react-data-tools';
46
42
  import { TableSelectableMode } from '@progress/kendo-react-data-tools';
47
43
  import { TableSelectableSettings } from '@progress/kendo-react-data-tools';
@@ -109,8 +105,30 @@ export { getSelectedStateFromKeyDown }
109
105
  */
110
106
  export declare const getStatusData: (args: StatusDataArgs) => StatusItem[];
111
107
 
112
- /** @hidden */
113
- export declare const Grid: ForwardRefExoticComponent<GridProps & RefAttributes<any>>;
108
+ /**
109
+ * Represents the [KendoReact Grid component]({% slug overview_grid %}).
110
+ *
111
+ * @example
112
+ * ```jsx
113
+ * const App = () => {
114
+ * const [data, setData] = useState([
115
+ * { foo: 'A1', bar: 'B1' },
116
+ * { foo: 'A2', bar: 'B2' },
117
+ * { foo: 'A3', bar: 'B2' }
118
+ * ]);
119
+ *
120
+ * return (
121
+ * <Grid data={data} reorderable={true}>
122
+ * <GridColumn field="foo" />
123
+ * <GridColumn field="bar" />
124
+ * </Grid>
125
+ * );
126
+ * };
127
+ *
128
+ * export default App;
129
+ * ```
130
+ */
131
+ export declare const Grid: React_2.ForwardRefExoticComponent<GridProps & React_2.RefAttributes<GridHandle | null>>;
114
132
 
115
133
  /** The attribute required by the Grid selection on Grid `td` elements. */
116
134
  export declare const GRID_COL_INDEX_ATTRIBUTE = "data-grid-col-index";
@@ -223,280 +241,6 @@ export declare interface GridCellsSettings {
223
241
  };
224
242
  }
225
243
 
226
- /**
227
- * Represents the [KendoReact Grid component]({% slug overview_grid %}).
228
- *
229
- * @example
230
- * ```jsx
231
- * class App extends React.Component {
232
- * constructor(props) {
233
- * super(props);
234
- * this.state = {
235
- * data: [
236
- * { 'foo': 'A1', 'bar': 'B1' },
237
- * { 'foo': 'A2', 'bar': 'B2' },
238
- * { 'foo': 'A3', 'bar': 'B2' }
239
- * ]
240
- * };
241
- * }
242
- * render() {
243
- * return (
244
- * <Grid
245
- * data={this.state.data}
246
- * reorderable={true}
247
- * >
248
- * <GridColumn field="foo" />
249
- * <GridColumn field="bar" />
250
- * </Grid>
251
- * );
252
- * }
253
- * }
254
- * ReactDOM.render(<App />, document.querySelector('my-app'));
255
- * ```
256
- */
257
- export declare class GridClassComponent extends React_2.Component<GridProps> {
258
- /**
259
- * @hidden
260
- */
261
- static displayName: string;
262
- /**
263
- * @hidden
264
- */
265
- static defaultProps: {};
266
- /**
267
- * @hidden
268
- */
269
- static propTypes: {
270
- data: PropTypes.Requireable<NonNullable<any[] | PropTypes.InferProps<{
271
- data: PropTypes.Requireable<any[]>;
272
- total: PropTypes.Requireable<number>;
273
- }> | null | undefined>>;
274
- sortable: PropTypes.Requireable<NonNullable<boolean | PropTypes.InferProps<{
275
- mode: PropTypes.Requireable<string>;
276
- allowUnsort: PropTypes.Requireable<boolean>;
277
- }> | null | undefined>>;
278
- onSortChange: PropTypes.Requireable<(...args: any[]) => any>;
279
- sort: PropTypes.Requireable<any[]>;
280
- filterable: PropTypes.Requireable<boolean>;
281
- filter: PropTypes.Requireable<any>;
282
- onFilterChange: PropTypes.Requireable<(...args: any[]) => any>;
283
- pageable: PropTypes.Requireable<NonNullable<boolean | PropTypes.InferProps<{
284
- buttonCount: PropTypes.Requireable<number>;
285
- responsive: PropTypes.Requireable<boolean>;
286
- info: PropTypes.Requireable<boolean>;
287
- type: PropTypes.Requireable<string>;
288
- pageSizes: PropTypes.Requireable<NonNullable<boolean | (NonNullable<string | number | null | undefined> | null | undefined)[] | null | undefined>>;
289
- previousNext: PropTypes.Requireable<boolean>;
290
- }> | null | undefined>>;
291
- pageSize: PropTypes.Requireable<number>;
292
- onPageChange: PropTypes.Requireable<(...args: any[]) => any>;
293
- total: PropTypes.Requireable<number>;
294
- skip: PropTypes.Requireable<number>;
295
- take: PropTypes.Requireable<number>;
296
- fixedScroll: PropTypes.Requireable<boolean>;
297
- onExpandChange: PropTypes.Requireable<(...args: any[]) => any>;
298
- expandField: PropTypes.Requireable<string>;
299
- selectedField: PropTypes.Requireable<string>;
300
- onSelectionChange: PropTypes.Requireable<(...args: any[]) => any>;
301
- onHeaderSelectionChange: PropTypes.Requireable<(...args: any[]) => any>;
302
- resizable: PropTypes.Requireable<boolean>;
303
- reorderable: PropTypes.Requireable<boolean>;
304
- group: PropTypes.Requireable<any>;
305
- groupable: PropTypes.Requireable<NonNullable<boolean | PropTypes.InferProps<{
306
- enabled: PropTypes.Requireable<boolean>;
307
- footer: PropTypes.Requireable<string>;
308
- }> | null | undefined>>;
309
- onGroupChange: PropTypes.Requireable<(...args: any[]) => any>;
310
- onRowClick: PropTypes.Requireable<(...args: any[]) => any>;
311
- onRowDoubleClick: PropTypes.Requireable<(...args: any[]) => any>;
312
- onItemChange: PropTypes.Requireable<(...args: any[]) => any>;
313
- editField: PropTypes.Requireable<string>;
314
- scrollable: PropTypes.Requireable<string>;
315
- rowHeight: PropTypes.Requireable<number>;
316
- detailRowHeight: PropTypes.Requireable<number>;
317
- detail: PropTypes.Requireable<any>;
318
- style: PropTypes.Requireable<object>;
319
- onDataStateChange: PropTypes.Requireable<(...args: any[]) => any>;
320
- onColumnResize: PropTypes.Requireable<(...args: any[]) => any>;
321
- onColumnReorder: PropTypes.Requireable<(...args: any[]) => any>;
322
- dataItemKey: PropTypes.Requireable<string>;
323
- navigatable: PropTypes.Requireable<NonNullable<boolean | PropTypes.InferProps<{
324
- mode: PropTypes.Requireable<string>;
325
- }> | null | undefined>>;
326
- size: PropTypes.Requireable<string>;
327
- };
328
- /** @hidden */
329
- static contextType: React_2.Context<TableKeyboardNavigationContextType | undefined>;
330
- protected dragLogic: GridCommonDragLogic;
331
- private _columns;
332
- private _columnsMap;
333
- private _columnsMutations;
334
- private _resized;
335
- private _focusFirst;
336
- private _newEditableRow?;
337
- private _singleEditRow?;
338
- private _lastActiveElement?;
339
- private _shouldUpdateLeftRight;
340
- private _scrollbarWidth?;
341
- private contextStateRef;
342
- private navigationStateRef;
343
- private _data;
344
- private _slicedData;
345
- private wrapperScrollTop;
346
- private showLicenseWatermark;
347
- private resizeObserver?;
348
- /**
349
- * A getter of the current columns. Gets the current column width or current columns, or any other [`GridColumnProps`]({% slug api_grid_gridcolumnprops %}) for each defined column. Can be used on each Grid instance. To obtain the instance of the rendered Grid, use the `ref` callback. The following example demonstrates how to reorder the columns by dragging their handlers and check the properties afterwards. You can check the result in the browser console.
350
- *
351
- * @example
352
- * ```jsx
353
- * class App extends React.Component {
354
- * constructor(props) {
355
- * super(props);
356
- * this.state = {
357
- * data: [
358
- * { 'foo': 'A1', 'bar': 'B1' },
359
- * { 'foo': 'A2', 'bar': 'B2' },
360
- * { 'foo': 'A3', 'bar': 'B2' }
361
- * ]
362
- * };
363
- * this.grid = null;
364
- * }
365
- * render() {
366
- * return (
367
- * <div>
368
- * <Grid
369
- * data={this.state.data}
370
- * reorderable={true}
371
- * ref={(g) => { this.grid = g; }}
372
- * >
373
- * <GridColumn field="foo" />
374
- * <GridColumn field="bar" />
375
- * </Grid>
376
- * <button onClick={() => console.log(JSON.stringify(this.grid.columns))}>
377
- * log current properties into browser console.
378
- * </button>
379
- * </div>
380
- * );
381
- * }
382
- * }
383
- * ReactDOM.render(<App />, document.querySelector('my-app'));
384
- * ```
385
- */
386
- get columns(): GridColumnProps[];
387
- /**
388
- * Returns the HTML element of the Grid component.
389
- */
390
- get element(): HTMLDivElement | null;
391
- private get document();
392
- private clipboardService?;
393
- private headerRef;
394
- private headerElementRef;
395
- private _element;
396
- private tableElement;
397
- private containerRef;
398
- private tableBodyRef;
399
- private vs;
400
- private columnResize;
401
- private _footer;
402
- private forceUpdateTimeout;
403
- private isRtl;
404
- private rowIndex;
405
- private headTable;
406
- private rowsInEdit;
407
- private get _header();
408
- private get _gridId();
409
- private observer;
410
- constructor(props: GridProps);
411
- private handleIntersection;
412
- private setCurrentOnTop;
413
- /**
414
- * Method to allow the scroll to be set to a specific row index when the Grid is scrollable. It is zero based.
415
- *
416
- * @param options - Object, containing the rowIndex to which is going to be scrolled.
417
- */
418
- scrollIntoView: (options: {
419
- rowIndex: number;
420
- }) => void;
421
- /**
422
- * Method to fit columns according to their content.
423
- *
424
- * @param columnIds - Array of column ids to be fitted.
425
- */
426
- fitColumns: (columnIds: string[]) => void;
427
- /**
428
- * @hidden
429
- */
430
- componentDidMount(): void;
431
- /**
432
- * @hidden
433
- */
434
- getSnapshotBeforeUpdate(): null;
435
- /**
436
- * @hidden
437
- */
438
- componentDidUpdate(): void;
439
- /**
440
- * @hidden
441
- */
442
- componentWillUnmount(): void;
443
- /**
444
- * @hidden
445
- */
446
- render(): JSX_2.Element;
447
- private getColumnsEssentialProps;
448
- private checkMatchMediaColumnsDifferece;
449
- private calculateMedia;
450
- private onContextMenu;
451
- private getVirtualScroll;
452
- private isAllData;
453
- private initializeVirtualization;
454
- private getCachedScrollbarWidth;
455
- private scrollHandler;
456
- private onKeyDown;
457
- private onFocus;
458
- private onNavigationAction;
459
- private rowClick;
460
- private rowDblClick;
461
- private itemChange;
462
- private selectionChange;
463
- private onHeaderSelectionChange;
464
- private selectionRelease;
465
- private pageChange;
466
- private getTotal;
467
- private moveToNextPage;
468
- private moveToPrevPage;
469
- private pagerPageChange;
470
- private sortChange;
471
- private filterChange;
472
- private groupChange;
473
- private raiseDataEvent;
474
- private columnReorder;
475
- private groupReorder;
476
- private columnToGroup;
477
- private columnGroupChange;
478
- private resetTableWidth;
479
- private onClipboard;
480
- private inActiveElement;
481
- private onResize;
482
- private reInitVirtualization;
483
- private flatData;
484
- private rowHeightService;
485
- private childrenToArray;
486
- private readColumns;
487
- private mapColumns;
488
- private filterColumnsByMediaProp;
489
- private initColumns;
490
- private configureColumns;
491
- private getHeaderRow;
492
- private resolveTitle;
493
- private getDataState;
494
- private getArguments;
495
- private getLeafDataItems;
496
- private getSlicedLeafDataItems;
497
- private handleFocusInEditableRows;
498
- }
499
-
500
244
  /**
501
245
  * @hidden
502
246
  */
@@ -522,71 +266,7 @@ declare interface GridColumnMenuBaseProps {
522
266
  onCloseMenu?: Function;
523
267
  }
524
268
 
525
- export declare class GridColumnMenuCheckboxFilter extends React_2.Component<GridColumnMenuCheckboxFilterProps, GridColumnMenuFilterStateProps_2> {
526
- /**
527
- * @hidden
528
- */
529
- static defaultProps: {
530
- uniqueData: boolean;
531
- };
532
- /**
533
- * @hidden
534
- */
535
- compositeFilterIndex: number;
536
- constructor(props: GridColumnMenuCheckboxFilterProps);
537
- /**
538
- * @hidden
539
- */
540
- componentDidUpdate(): void;
541
- /**
542
- * @hidden
543
- */
544
- defaultFilter: () => any;
545
- /**
546
- * @hidden
547
- */
548
- isControlled: () => boolean;
549
- /**
550
- * @hidden
551
- */
552
- parseData: (originalData: any, isUnique: any) => any;
553
- /**
554
- * @hidden
555
- */
556
- getFilterIndex: () => any;
557
- /**
558
- * @hidden
559
- */
560
- onFilterExpand: () => void;
561
- /**
562
- * @hidden
563
- */
564
- handleSearchChange: (e: any) => void;
565
- /**
566
- * @hidden
567
- */
568
- handleClear: () => void;
569
- /**
570
- * @hidden
571
- */
572
- clear: (e: React_2.SyntheticEvent<any>) => void;
573
- /**
574
- * @hidden
575
- */
576
- submit: (e: React_2.SyntheticEvent<any>) => void;
577
- /**
578
- * @hidden
579
- */
580
- handleCheckBoxChange: (e: any, value: any) => void;
581
- /**
582
- * @hidden
583
- */
584
- isAllSelected: () => boolean;
585
- /**
586
- * @hidden
587
- */
588
- render(): JSX_2.Element;
589
- }
269
+ export declare const GridColumnMenuCheckboxFilter: (props: GridColumnMenuCheckboxFilterProps) => JSX_2.Element;
590
270
 
591
271
  /**
592
272
  * The props of the GridColumnMenuFilter component.
@@ -738,64 +418,7 @@ export declare interface GridColumnMenuColumnsListProps {
738
418
  * ReactDOM.render(<App />, document.querySelector('my-app'));
739
419
  * ```
740
420
  */
741
- export declare class GridColumnMenuFilter extends React_2.Component<GridColumnMenuFilterProps, GridColumnMenuFilterStateProps> {
742
- /**
743
- * Can be used to check if filtering is applied to a specific field ([see example]({% slug column_menu_grid %}#toc-styling-the-column-menu-icon)). Useful for creating active filter indicators.
744
- */
745
- static active: (field: string, filter?: CompositeFilterDescriptor) => boolean;
746
- constructor(props: GridColumnMenuFilterProps);
747
- /**
748
- * @hidden
749
- */
750
- removeGroup: (group: CompositeFilterDescriptor, rootFilter: CompositeFilterDescriptor) => CompositeFilterDescriptor;
751
- /**
752
- * @hidden
753
- */
754
- insertGroup: (group: CompositeFilterDescriptor, rootFilter: CompositeFilterDescriptor) => CompositeFilterDescriptor;
755
- /**
756
- * @hidden
757
- */
758
- isControlled: () => boolean;
759
- /**
760
- * @hidden
761
- */
762
- onFilterExpand: () => void;
763
- /**
764
- * @hidden
765
- */
766
- firstFilterChange: (event: any) => void;
767
- /**
768
- * @hidden
769
- */
770
- secondFilterChange: (event: any) => void;
771
- /**
772
- * @hidden
773
- */
774
- filterChange: (filterIndex: number, e: {
775
- value: number;
776
- operator: string;
777
- }) => void;
778
- /**
779
- * @hidden
780
- */
781
- logicChange: (event: any) => void;
782
- /**
783
- * @hidden
784
- */
785
- clear: (event: React_2.SyntheticEvent<any>) => void;
786
- /**
787
- * @hidden
788
- */
789
- currentFilterGroup: () => CompositeFilterDescriptor;
790
- /**
791
- * @hidden
792
- */
793
- submit: (event: React_2.SyntheticEvent<any>) => void;
794
- /**
795
- * @hidden
796
- */
797
- render(): JSX_2.Element;
798
- }
421
+ export declare const GridColumnMenuFilter: (props: GridColumnMenuFilterProps) => JSX_2.Element;
799
422
 
800
423
  /**
801
424
  * The props passed to the ColumnMenu filter component.
@@ -822,18 +445,7 @@ declare interface GridColumnMenuFilterBaseProps extends GridColumnMenuBaseProps
822
445
  /**
823
446
  * @hidden
824
447
  */
825
- export declare class GridColumnMenuFilterCell extends React_2.Component<GridColumnMenuFilterCellProps, {}> {
826
- constructor(props: GridColumnMenuFilterCellProps);
827
- /**
828
- * @hidden
829
- */
830
- render(): JSX_2.Element;
831
- private renderOperatorEditor;
832
- private inputChange;
833
- private operatorChange;
834
- private boolDropdownChange;
835
- private filterComponent;
836
- }
448
+ export declare const GridColumnMenuFilterCell: (props: GridColumnMenuFilterCellProps) => JSX_2.Element;
837
449
 
838
450
  /**
839
451
  * @hidden
@@ -883,28 +495,7 @@ export declare interface GridColumnMenuFilterProps extends GridColumnMenuFilterB
883
495
  /**
884
496
  * @hidden
885
497
  */
886
- declare interface GridColumnMenuFilterStateProps {
887
- expanded: boolean;
888
- filterGroup: CompositeFilterDescriptor;
889
- }
890
-
891
- /**
892
- * @hidden
893
- */
894
- declare interface GridColumnMenuFilterStateProps_2 {
895
- expanded: boolean;
896
- value: string;
897
- data: Array<string | object>;
898
- dataFromProps: Array<string | object>;
899
- currentFilter: CompositeFilterDescriptor;
900
- }
901
-
902
- /**
903
- * @hidden
904
- */
905
- export declare class GridColumnMenuFilterUI extends React_2.Component<GridColumnMenuFilterUIProps, {}> {
906
- render(): JSX_2.Element;
907
- }
498
+ export declare const GridColumnMenuFilterUI: (props: GridColumnMenuFilterUIProps) => JSX_2.Element;
908
499
 
909
500
  /**
910
501
  * The props that will be passed to the UI of the ColumnMenu filter component.
@@ -939,69 +530,50 @@ export declare interface GridColumnMenuFilterUIProps {
939
530
  /**
940
531
  * @example
941
532
  * ```jsx-no-run
942
- * class TextColumnMenu extends React.Component {
943
- * render() {
944
- * return (
533
+ * const TextColumnMenu = (props) => {
534
+ * return (
945
535
  * <div>
946
- * <GridColumnMenuSort {...this.props} />
947
- * <GridColumnMenuGroup {...this.props} />
948
- * </div>);
949
- * }
950
- * }
536
+ * <GridColumnMenuSort {...props} />
537
+ * <GridColumnMenuGroup {...props} />
538
+ * </div>
539
+ * );
540
+ * };
951
541
  *
952
- * class App extends React.PureComponent {
953
- * constructor(props) {
954
- * super(props);
542
+ * const initialState = {
543
+ * take: 10,
544
+ * skip: 0
545
+ * };
955
546
  *
956
- * this.state = this.createAppState({
957
- * take: 10,
958
- * skip: 0
959
- * });
960
- * }
547
+ * const App = () => {
548
+ * const [dataState, setDataState] = useState(initialState);
549
+ * const [result, setResult] = useState(process(products.slice(0), initialState));
961
550
  *
962
- * createAppState(dataState) {
963
- * return {
964
- * result: process(products.slice(0), dataState),
965
- * dataState: dataState
966
- * };
967
- * }
968
- *
969
- * dataStateChange = (event) => {
970
- * this.setState(this.createAppState(event.dataState));
551
+ * const dataStateChange = (event) => {
552
+ * setDataState(event.dataState);
553
+ * setResult(process(products.slice(0), event.dataState));
971
554
  * }
972
555
  *
973
- * render() {
974
- * return (
975
- * <div>
976
- * <Grid
977
- * data={this.state.result}
978
- * {...this.state.dataState}
979
- * onDataStateChange={this.dataStateChange}
980
- * sortable={true}
981
- * pageable={true}
982
- * >
983
- * <Column field="ProductID" title="Product ID" />
984
- * <Column field="ProductName" columnMenu={TextColumnMenu} />
985
- * </Grid>
986
- * <br />
987
- * </div>
988
- * );
989
- * }
990
- * }
556
+ * return (
557
+ * <div>
558
+ * <Grid
559
+ * data={result}
560
+ * {...dataState}
561
+ * onDataStateChange={dataStateChange}
562
+ * sortable={true}
563
+ * pageable={true}
564
+ * >
565
+ * <Column field="ProductID" title="Product ID" />
566
+ * <Column field="ProductName" columnMenu={TextColumnMenu} />
567
+ * </Grid>
568
+ * <br />
569
+ * </div>
570
+ * );
571
+ * };
991
572
  *
992
- * ReactDOM.render(<App />, document.querySelector('my-app'));
573
+ * export default App;
993
574
  * ```
994
575
  */
995
- export declare class GridColumnMenuGroup extends React_2.Component<GridColumnMenuGroupProps, {}> {
996
- /**
997
- * @hidden
998
- */
999
- onGroupClick: (event: React_2.MouseEvent<HTMLAnchorElement>) => void;
1000
- /**
1001
- * @hidden
1002
- */
1003
- render(): JSX_2.Element;
1004
- }
576
+ export declare const GridColumnMenuGroup: (props: GridColumnMenuGroupProps) => JSX_2.Element;
1005
577
 
1006
578
  /**
1007
579
  * The props passed to the ColumnMenu group component.
@@ -1035,12 +607,7 @@ export declare const GridColumnMenuItem: (props: GridColumnMenuItemProps) => JSX
1035
607
  /**
1036
608
  * The GridColumnMenuItemContent that will be used inside the Grid ColumnMenu.
1037
609
  */
1038
- export declare class GridColumnMenuItemContent extends React_2.Component<GridColumnMenuItemContentProps, {}> {
1039
- /**
1040
- * @hidden
1041
- */
1042
- render(): JSX_2.Element;
1043
- }
610
+ export declare const GridColumnMenuItemContent: (props: GridColumnMenuItemContentProps) => JSX_2.Element;
1044
611
 
1045
612
  /**
1046
613
  * The props of the GridColumnMenuItemContent component.
@@ -1055,12 +622,7 @@ declare interface GridColumnMenuItemContentProps extends KendoReactComponentBase
1055
622
  /**
1056
623
  * The GridColumnMenuItemGroup that will be used inside the Grid ColumnMenu.
1057
624
  */
1058
- export declare class GridColumnMenuItemGroup extends React_2.Component<GridColumnMenuItemGroupProps, {}> {
1059
- /**
1060
- * @hidden
1061
- */
1062
- render(): JSX_2.Element;
1063
- }
625
+ export declare const GridColumnMenuItemGroup: (props: GridColumnMenuItemGroupProps) => JSX_2.Element;
1064
626
 
1065
627
  /**
1066
628
  * The props of the GridColumnMenuItemGroup component.
@@ -1068,6 +630,9 @@ export declare class GridColumnMenuItemGroup extends React_2.Component<GridColum
1068
630
  declare interface GridColumnMenuItemGroupProps extends KendoReactComponentBaseProps {
1069
631
  }
1070
632
 
633
+ declare interface GridColumnMenuItemGroupProps extends KendoReactComponentBaseProps {
634
+ }
635
+
1071
636
  /**
1072
637
  * The props of the GridColumnMenuItem component.
1073
638
  */
@@ -1105,80 +670,51 @@ export declare interface GridColumnMenuProps extends GridColumnMenuFilterBasePro
1105
670
  /**
1106
671
  * @example
1107
672
  * ```jsx-no-run
1108
- * class ColumnMenu extends React.Component {
1109
- * render() {
1110
- * return (
673
+ * const ColumnMenu = (props) => {
674
+ * return (
1111
675
  * <div>
1112
- * <GridColumnMenuSort {...this.props} />
1113
- * </div>);
1114
- * }
1115
- * }
1116
- *
1117
- * class App extends React.PureComponent {
1118
- * constructor(props) {
1119
- * super(props);
676
+ * <GridColumnMenuSort {...props} />
677
+ * </div>
678
+ * );
679
+ * };
1120
680
  *
1121
- * this.state = this.createAppState({
1122
- * take: 10,
1123
- * skip: 0
1124
- * });
1125
- * }
681
+ * const initialState = {
682
+ * take: 10,
683
+ * skip: 0
684
+ * };
1126
685
  *
1127
- * createAppState(dataState) {
1128
- * return {
1129
- * result: process(products.slice(0), dataState),
1130
- * dataState: dataState
1131
- * };
1132
- * }
686
+ * const App = () => {
687
+ * const [dataState, setDataState] = useState(initialState);
688
+ * const [result, setResult] = useState(process(products.slice(0), initialState));
1133
689
  *
1134
- * dataStateChange = (event) => {
1135
- * this.setState(this.createAppState(event.dataState));
1136
- * }
690
+ * const dataStateChange = (event) => {
691
+ * setDataState(event.dataState);
692
+ * setResult(process(products.slice(0), event.dataState));
693
+ * };
1137
694
  *
1138
- * render() {
1139
- * return (
695
+ * return (
696
+ * <div>
1140
697
  * <div>
1141
698
  * <Grid
1142
- * data={this.state.result}
1143
- * {...this.state.dataState}
1144
- * onDataStateChange={this.dataStateChange}
699
+ * data={result}
700
+ * {...dataState}
701
+ * onDataStateChange={dataStateChange}
1145
702
  * sortable={true}
1146
703
  * pageable={true}
1147
704
  * >
1148
- * <Column field="ProductID" title="Product ID" columnMenu={ColumnMenu}/>
705
+ * <Column field="ProductID" title="Product ID" columnMenu={ColumnMenu} />
1149
706
  * <Column field="ProductName" />
1150
707
  * </Grid>
1151
708
  * <br />
1152
709
  * </div>
1153
- * );
1154
- * }
1155
- * }
710
+ * </div>
711
+ * );
712
+ * };
1156
713
  *
1157
- * ReactDOM.render(<App />, document.querySelector('my-app'));
714
+ * export default App;
1158
715
  * ```
1159
716
  */
1160
- export declare class GridColumnMenuSort extends React_2.Component<GridColumnMenuSortProps, {}> {
1161
- /**
1162
- * Can be used to check if sorting is applied to a specific field ([see example]({% slug column_menu_grid %}#toc-styling-the-column-menu-icon)). Useful for creating active sort indicators.
1163
- */
1164
- static active: (field: string, sort?: SortDescriptor[]) => boolean;
1165
- /**
1166
- * @hidden
1167
- */
1168
- onAscClick: (event: any) => void;
1169
- /**
1170
- * @hidden
1171
- */
1172
- onDescClick: (event: any) => void;
1173
- /**
1174
- * @hidden
1175
- */
1176
- onSort: (event: React_2.MouseEvent<HTMLAnchorElement>, selectedDir: 'asc' | 'desc') => void;
1177
- /**
1178
- * @hidden
1179
- */
1180
- render(): JSX_2.Element;
1181
- }
717
+ export declare const GridColumnMenuSort: (props: GridColumnMenuSortProps) => JSX_2.Element;
1182
718
 
1183
719
  /**
1184
720
  * The props passed to the ColumnMenu sort component.
@@ -1322,7 +858,7 @@ export declare interface GridColumnReorderEvent {
1322
858
  /**
1323
859
  * An event target.
1324
860
  */
1325
- target: GridClassComponent;
861
+ target: GridHandle;
1326
862
  /**
1327
863
  * A native DOM event.
1328
864
  */
@@ -1344,7 +880,7 @@ export declare interface GridColumnResizeEvent {
1344
880
  /**
1345
881
  * An event target.
1346
882
  */
1347
- target: GridClassComponent;
883
+ target: GridHandle;
1348
884
  /**
1349
885
  * A native DOM event.
1350
886
  * Can be `null` when the callback source is not user action (e.g.: method call).
@@ -1465,7 +1001,7 @@ export declare interface GridCustomFilterCellProps extends GridFilterCellProps {
1465
1001
  /**
1466
1002
  * The props and attributes that are applied to the td element by default.
1467
1003
  */
1468
- thProps?: GridThAttributes | null;
1004
+ tdProps?: GridTdAttributes | null;
1469
1005
  /**
1470
1006
  * The default children of the table cell.
1471
1007
  */
@@ -1524,50 +1060,34 @@ export declare interface GridDataStateChangeEvent extends GridEvent {
1524
1060
  *
1525
1061
  * @example
1526
1062
  * ```jsx
1527
- * class CustomGridDetailRow extends GridDetailRow {
1528
- * render() {
1529
- * const detailData = this.props.dataItem.MasterField2;
1530
- * return (
1531
- * <div>
1532
- * This is detail template with another grid inside it
1533
- * <Grid scrollable="none" data={detailData} />
1534
- * </div>
1535
- * );
1536
- * }
1537
- * }
1063
+ * const CustomGridDetailRow = (props) => {
1064
+ * const detailData = props.dataItem.MasterField2;
1065
+ * return (
1066
+ * <div>
1067
+ * This is detail template with another grid inside it
1068
+ * <Grid scrollable="none" data={detailData} />
1069
+ * </div>
1070
+ * );
1071
+ * };
1538
1072
  *
1539
- * class App extends React.Component {
1540
- * constructor(props) {
1541
- * super(props);
1542
- * this.state = {
1543
- * data: [{MasterField1:'A1', MasterField2: [{DetailField1: 1, DetailField2: 2}]},
1544
- * {MasterField1:'B1', MasterField2: [{DetailField1: 3, DetailField2: 4}]},
1545
- * {MasterField1:'C1', MasterField2: [{DetailField1: 5, DetailField2: 6}]}]
1546
- * };
1547
- * }
1548
- * render() {
1549
- * return (
1550
- * <Grid
1551
- * data={this.state.data}
1552
- * detail={CustomGridDetailRow}
1553
- * >
1554
- * <GridColumn field="MasterField1" />
1555
- * </Grid>
1556
- * );
1557
- * }
1558
- * }
1559
- * ReactDOM.render(
1560
- * <App />,
1561
- * document.querySelector('my-app')
1562
- * );
1073
+ * const App = () => {
1074
+ * const [data, setData] = useState([
1075
+ * { MasterField1: 'A1', MasterField2: [{ DetailField1: 1, DetailField2: 2 }] },
1076
+ * { MasterField1: 'B1', MasterField2: [{ DetailField1: 3, DetailField2: 4 }] },
1077
+ * { MasterField1: 'C1', MasterField2: [{ DetailField1: 5, DetailField2: 6 }] }
1078
+ * ]);
1079
+ *
1080
+ * return (
1081
+ * <Grid data={data} detail={CustomGridDetailRow}>
1082
+ * <GridColumn field="MasterField1" />
1083
+ * </Grid>
1084
+ * );
1085
+ * };
1086
+ *
1087
+ * export default App;
1563
1088
  * ```
1564
1089
  */
1565
- export declare class GridDetailRow extends React_2.Component<GridDetailRowProps, {}> {
1566
- /**
1567
- * @hidden
1568
- */
1569
- render(): JSX.Element | null;
1570
- }
1090
+ export declare const GridDetailRow: (props: GridDetailRowProps) => null;
1571
1091
 
1572
1092
  /**
1573
1093
  * The props of the GridDetailRow component ([see example]({% slug detailrow_grid %})).
@@ -1595,7 +1115,7 @@ export declare const GridEditCell: (props: GridCellProps) => JSX_2.Element | nul
1595
1115
  /**
1596
1116
  * Represents the base event object of the Grid.
1597
1117
  */
1598
- export declare interface GridEvent extends BaseEvent<GridClassComponent> {
1118
+ export declare interface GridEvent extends BaseEvent<GridHandle> {
1599
1119
  }
1600
1120
 
1601
1121
  /**
@@ -1616,20 +1136,7 @@ export declare interface GridExpandChangeEvent extends GridEvent {
1616
1136
  dataIndex: number;
1617
1137
  }
1618
1138
 
1619
- export declare class GridFilterCell extends React_2.Component<GridFilterCellProps, {}> {
1620
- private _inputRef;
1621
- constructor(props: GridFilterCellProps);
1622
- /**
1623
- * @hidden
1624
- */
1625
- render(): string | number | boolean | Iterable<React_2.ReactNode> | JSX_2.Element | null | undefined;
1626
- private renderOperatorEditor;
1627
- private inputChange;
1628
- private operatorChange;
1629
- private boolDropdownChange;
1630
- private clear;
1631
- private filterComponent;
1632
- }
1139
+ export declare const GridFilterCell: (props: GridFilterCellProps) => string | number | boolean | Iterable<React_2.ReactNode> | JSX_2.Element | null | undefined;
1633
1140
 
1634
1141
  /**
1635
1142
  * The props of the GridFilterCell component
@@ -1815,51 +1322,95 @@ export declare interface GridGroupChangeEvent extends GridEvent {
1815
1322
  /**
1816
1323
  * Represent the `ref` of the Grid component.
1817
1324
  */
1818
- export declare interface GridHandle extends Pick<GridClassComponent, keyof GridClassComponent> {
1325
+ export declare interface GridHandle {
1326
+ /**
1327
+ * Returns the HTML element of the Grid component.
1328
+ */
1329
+ element: HTMLDivElement | null;
1330
+ /**
1331
+ * The props values of the Spreadsheet.
1332
+ */
1333
+ props: GridProps;
1334
+ /**
1335
+ * A getter of the current columns. Gets the current column width or current columns, or any other [`GridColumnProps`]({% slug api_grid_gridcolumnprops %}) for each defined column. Can be used on each Grid instance. To obtain the instance of the rendered Grid, use the `ref` callback. The following example demonstrates how to reorder the columns by dragging their handlers and check the properties afterwards. You can check the result in the browser console.
1336
+ *
1337
+ * @example
1338
+ * ```jsx
1339
+ * const App = () => {
1340
+ * const [data, setData] = useState([
1341
+ * { foo: 'A1', bar: 'B1' },
1342
+ * { foo: 'A2', bar: 'B2' },
1343
+ * { foo: 'A3', bar: 'B2' }
1344
+ * ]);
1345
+ *
1346
+ * const grid = useRef<GridHandle>();
1347
+ *
1348
+ * return (
1349
+ * <div>
1350
+ * <Grid data={data} reorderable={true} ref={grid}>
1351
+ * <GridColumn field="foo" />
1352
+ * <GridColumn field="bar" />
1353
+ * </Grid>
1354
+ * <button onClick={() => console.log(JSON.stringify(grid.current?.columns))}>
1355
+ * log current properties into browser console.
1356
+ * </button>
1357
+ * </div>
1358
+ * );
1359
+ * };
1360
+ *
1361
+ * export default App;
1362
+ * ReactDOM.render(<App />, document.querySelector('my-app'));
1363
+ * ```
1364
+ */
1365
+ columns: GridColumnProps[];
1366
+ /**
1367
+ * Method to allow the scroll to be set to a specific row index when the Grid is scrollable. It is zero based.
1368
+ *
1369
+ * @param options - Object, containing the rowIndex to which is going to be scrolled.
1370
+ */
1371
+ scrollIntoView: (options: {
1372
+ rowIndex: number;
1373
+ }) => void;
1374
+ /**
1375
+ * Method to fit columns according to their content.
1376
+ *
1377
+ * @param columnIds - Array of column ids to be fitted.
1378
+ */
1379
+ fitColumns: (columnIds: string[]) => void;
1819
1380
  }
1820
1381
 
1821
1382
  /**
1822
1383
  * @example
1823
1384
  * ```jsx
1824
- * class App extends React.PureComponent {
1825
- * state = {
1826
- * details: false,
1827
- * data: [
1828
- * { foo: 'A1', bar: 'B1', b1: 1, b2:2 },
1829
- * { foo: 'A2', bar: 'B2', b1: 3, b2:4 },
1830
- * { foo: 'A3', bar: 'B2', b1: 5, b2:6 }
1831
- * ]
1832
- * };
1385
+ * const App = () => {
1386
+ * const [data, setData] = useState([
1387
+ * { foo: 'A1', bar: 'B1', b1: 1, b2: 2 },
1388
+ * { foo: 'A2', bar: 'B2', b1: 3, b2: 4 },
1389
+ * { foo: 'A3', bar: 'B2', b1: 5, b2: 6 }
1390
+ * ]);
1391
+ * const [barDetails, setBarDetails] = useState(false);
1833
1392
  *
1834
- * CustomHeaderCell = (props) =>
1835
- * <span>
1836
- * {props.title || props.field + ' '}
1837
- * <button onClick={() => this.setState({ barDetails: !this.state.barDetails })}>
1838
- * {this.state.barDetails ? 'collapse' : 'expand'}
1839
- * </button>
1840
- * {props.children}
1841
- * </span>
1393
+ * const CustomHeaderCell = (props) => (
1394
+ * <span>
1395
+ * {props.title || props.field + ' '}
1396
+ * <button onClick={() => setBarDetails(!barDetails)}>
1397
+ * {barDetails ? 'collapse' : 'expand'}
1398
+ * </button>
1399
+ * {props.children}
1400
+ * </span>
1401
+ * );
1842
1402
  *
1843
- * render() {
1844
- * return (
1845
- * <Grid
1846
- * style={{ height: '420px' }}
1847
- * data={this.state.data}
1848
- * reorderable={true}
1849
- * >
1850
- * <GridColumn field="foo" />
1851
- * <GridColumn field="bar" headerCell={this.CustomHeaderCell}>
1852
- * {this.state.barDetails && [
1853
- * <GridColumn field="b1" />,
1854
- * <GridColumn field="b2" />
1855
- * ]}
1856
- * </GridColumn>
1857
- * </Grid>
1858
- * );
1859
- * }
1860
- * }
1403
+ * return (
1404
+ * <Grid style={{ height: '420px' }} data={data} reorderable={true}>
1405
+ * <GridColumn field="foo" />
1406
+ * <GridColumn field="bar" headerCell={CustomHeaderCell}>
1407
+ * {barDetails && [<GridColumn field="b1" />, <GridColumn field="b2" />]}
1408
+ * </GridColumn>
1409
+ * </Grid>
1410
+ * );
1411
+ * };
1861
1412
  *
1862
- * ReactDOM.render(<App />, document.querySelector('my-app'));
1413
+ * export default App;
1863
1414
  * ```
1864
1415
  */
1865
1416
  export declare const GridHeaderCell: (props: GridHeaderCellProps) => string | number | boolean | Iterable<React_2.ReactNode> | JSX_2.Element | null | undefined;
@@ -1931,7 +1482,7 @@ export declare interface GridItemChangeEvent extends GridEvent {
1931
1482
  /**
1932
1483
  * Represents the object of the `GridKeyDownEvent` Grid event.
1933
1484
  */
1934
- export declare interface GridKeyDownEvent extends GridEvent, TableKeyDownEvent<GridClassComponent> {
1485
+ export declare interface GridKeyDownEvent extends GridEvent, TableKeyDownEvent<GridHandle> {
1935
1486
  }
1936
1487
 
1937
1488
  /**
@@ -2014,35 +1565,23 @@ export declare interface GridNavigationActionEvent extends GridEvent {
2014
1565
  *
2015
1566
  * @example
2016
1567
  * ```jsx
2017
- * class App extends React.Component {
2018
- * render() {
2019
- * return (
2020
- * <Grid data={[]}>
2021
- * <GridNoRecords>
2022
- * There is no data available
2023
- * </GridNoRecords>
2024
- * <GridColumn field="id" />
2025
- * <GridColumn field="name" />
2026
- * </Grid>
2027
- * );
2028
- * }
2029
- * }
2030
- * ReactDOM.render(
2031
- * <App />,
2032
- * document.querySelector('my-app')
2033
- * );
1568
+ * const App = () => {
1569
+ * return (
1570
+ * <Grid data={[]}>
1571
+ * <GridNoRecords>There is no data available</GridNoRecords>
1572
+ * <GridColumn field="id" />
1573
+ * <GridColumn field="name" />
1574
+ * </Grid>
1575
+ * );
1576
+ * };
1577
+ *
1578
+ * export default App;
2034
1579
  * ```
2035
1580
  */
2036
- export declare class GridNoRecords extends React_2.Component<GridNoRecordsProps, {}> {
2037
- /**
2038
- * @hidden
2039
- */
2040
- static displayName: string;
2041
- /**
2042
- * @hidden
2043
- */
2044
- render(): any;
2045
- }
1581
+ export declare const GridNoRecords: {
1582
+ (props: GridNoRecordsProps): string | number | true | React_2.ReactElement<any, string | React_2.JSXElementConstructor<any>> | Iterable<React_2.ReactNode>;
1583
+ displayName: string;
1584
+ };
2046
1585
 
2047
1586
  /**
2048
1587
  * The props of the GridNoRecords component.
@@ -2537,7 +2076,7 @@ export declare const GridSelectionCell: (props: GridCellProps) => JSX_2.Element
2537
2076
  /**
2538
2077
  * Represents the object of the `onSelectionChange` Grid event.
2539
2078
  */
2540
- export declare interface GridSelectionChangeEvent extends GridEvent, TableSelectionChangeEvent<GridClassComponent> {
2079
+ export declare interface GridSelectionChangeEvent extends GridEvent, TableSelectionChangeEvent<GridHandle> {
2541
2080
  /**
2542
2081
  * The dataItem from which the selection starts(Valid for scenarios without checkbox selection).
2543
2082
  */
@@ -2574,6 +2113,7 @@ export declare type GridSortSettings = SortSettings;
2574
2113
 
2575
2114
  export declare interface GridTdAttributes extends React.TdHTMLAttributes<HTMLTableCellElement> {
2576
2115
  [TABLE_COL_INDEX_ATTRIBUTE]?: number;
2116
+ columnId?: string;
2577
2117
  key?: string;
2578
2118
  }
2579
2119
 
@@ -2587,49 +2127,35 @@ export declare interface GridThAttributes extends HeaderThElementProps {
2587
2127
  *
2588
2128
  * @example
2589
2129
  * ```jsx
2590
- * class App extends React.Component {
2591
- * state = {
2592
- * data: [
2593
- * {'Column1':'A1', 'Column2':'A2'},
2594
- * {'Column1':'B1', 'Column2':'B2'},
2595
- * {'Column1':'C1', 'Column2':'C2'}
2596
- * ]
2597
- * }
2130
+ * const App = () => {
2131
+ * const [data, setData] = useState([
2132
+ * { Column1: 'A1', Column2: 'A2' },
2133
+ * { Column1: 'B1', Column2: 'B2' },
2134
+ * { Column1: 'C1', Column2: 'C2' }
2135
+ * ]);
2598
2136
  *
2599
- * customClick = () => {
2600
- * alert("Custom handler in custom toolbar");
2601
- * }
2602
- * render() {
2603
- * return (
2604
- * <Grid data={this.state.data}>
2605
- * <GridToolbar>
2606
- * <button
2607
- * title="Click"
2608
- * className="k-button k-primary"
2609
- * onClick={this.customClick}
2610
- * >Click
2611
- * </button>
2612
- * </GridToolbar>
2613
- * </Grid>
2614
- * );
2615
- * }
2616
- * }
2617
- * ReactDOM.render(
2618
- * <App />,
2619
- * document.querySelector('my-app')
2620
- * );
2137
+ * const customClick = () => {
2138
+ * alert('Custom handler in custom toolbar');
2139
+ * };
2140
+ *
2141
+ * return (
2142
+ * <Grid data={data}>
2143
+ * <GridToolbar>
2144
+ * <button title="Click" className="k-button k-primary" onClick={customClick}>
2145
+ * Click
2146
+ * </button>
2147
+ * </GridToolbar>
2148
+ * </Grid>
2149
+ * );
2150
+ * };
2151
+ *
2152
+ * export default App;
2621
2153
  * ```
2622
2154
  */
2623
- export declare class GridToolbar extends React_2.Component<GridToolbarProps, {}> {
2624
- /**
2625
- * @hidden
2626
- */
2627
- static displayName: string;
2628
- /**
2629
- * @hidden
2630
- */
2631
- render(): JSX_2.Element;
2632
- }
2155
+ export declare const GridToolbar: {
2156
+ (props: GridToolbarProps): JSX_2.Element;
2157
+ displayName: string;
2158
+ };
2633
2159
 
2634
2160
  /**
2635
2161
  * The properties of the GridToolbar component.
@@ -2670,6 +2196,16 @@ export declare interface GridToolbarProps {
2670
2196
  */
2671
2197
  declare type handler = (prevIndex: number, nextIndex: number, nativeEvent: any) => void;
2672
2198
 
2199
+ /**
2200
+ * Can be used to check if filtering is applied to a specific field ([see example]({% slug column_menu_grid %}#toc-styling-the-column-menu-icon)). Useful for creating active filter indicators.
2201
+ */
2202
+ export declare const isColumnMenuFilterActive: (field: string, filter?: CompositeFilterDescriptor) => boolean;
2203
+
2204
+ /**
2205
+ * Can be used to check if sorting is applied to a specific field ([see example]({% slug column_menu_grid %}#toc-styling-the-column-menu-icon)). Useful for creating active sort indicators.
2206
+ */
2207
+ export declare const isColumnMenuSortActive: (field: string, sort?: SortDescriptor[]) => boolean;
2208
+
2673
2209
  /**
2674
2210
  * @hidden
2675
2211
  */