material-react-table 1.13.1 → 1.15.0

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.
package/src/types.ts CHANGED
@@ -364,7 +364,7 @@ export type MRT_ColumnDef<TData extends Record<string, any> = {}> =
364
364
  * @example accessorKey: 'username' //simple
365
365
  * @example accessorKey: 'name.firstName' //deep key dot notation
366
366
  */
367
- accessorKey?: DeepKeys<TData>;
367
+ accessorKey?: (string & {}) | DeepKeys<TData>;
368
368
  aggregationFn?: MRT_AggregationFn<TData> | Array<MRT_AggregationFn<TData>>;
369
369
  /**
370
370
  * Specify what type of column this is. Either `data`, `display`, or `group`. Defaults to `data`.
@@ -485,6 +485,7 @@ export type MRT_ColumnDef<TData extends Record<string, any> = {}> =
485
485
  renderColumnActionsMenuItems?: (props: {
486
486
  closeMenu: () => void;
487
487
  column: MRT_Column<TData>;
488
+ internalColumnMenuItems: ReactNode[];
488
489
  table: MRT_TableInstance<TData>;
489
490
  }) => ReactNode[];
490
491
  renderColumnFilterModeMenuItems?: (props: {
@@ -602,382 +603,381 @@ export type MRT_CreateTableFeature<
602
603
  * @link https://www.material-react-table.com/docs/api/props
603
604
  */
604
605
  export type MaterialReactTableProps<TData extends Record<string, any> = {}> =
605
- Prettify<
606
- Omit<
607
- Partial<TableOptions<TData>>,
608
- | 'columns'
609
- | 'data'
610
- | 'defaultColumn'
611
- | 'enableRowSelection'
612
- | 'expandRowsFn'
613
- | 'getRowId'
614
- | 'globalFilterFn'
615
- | 'initialState'
616
- | 'onStateChange'
617
- | 'state'
618
- > & {
619
- columnFilterModeOptions?: Array<
620
- LiteralUnion<string & MRT_FilterOption>
621
- > | null;
622
- /**
623
- * The columns to display in the table. `accessorKey`s or `accessorFn`s must match keys in the `data` prop.
624
- *
625
- * See more info on creating columns on the official docs site:
626
- * @link https://www.material-react-table.com/docs/guides/data-columns
627
- * @link https://www.material-react-table.com/docs/guides/display-columns
628
- *
629
- * See all Columns Options on the official docs site:
630
- * @link https://www.material-react-table.com/docs/api/column-options
631
- */
632
- columns: MRT_ColumnDef<TData>[];
633
- /**
634
- * Pass your data as an array of objects. Objects can theoretically be any shape, but it's best to keep them consistent.
635
- *
636
- * See the usage guide for more info on creating columns and data:
637
- * @link https://www.material-react-table.com/docs/getting-started/usage
638
- */
639
- data: TData[];
640
- /**
641
- * Instead of specifying a bunch of the same options for each column, you can just change an option in the `defaultColumn` prop to change a default option for all columns.
642
- */
643
- defaultColumn?: Partial<MRT_ColumnDef<TData>>;
644
- /**
645
- * Change the default options for display columns.
646
- */
647
- defaultDisplayColumn?: Partial<MRT_ColumnDef<TData>>;
648
- displayColumnDefOptions?: Partial<{
649
- [key in MRT_DisplayColumnIds]: Partial<MRT_ColumnDef>;
650
- }>;
651
- editingMode?: 'table' | 'modal' | 'row' | 'cell';
652
- enableBottomToolbar?: boolean;
653
- enableClickToCopy?: boolean;
654
- enableColumnActions?: boolean;
655
- enableColumnDragging?: boolean;
656
- enableColumnFilterModes?: boolean;
657
- enableColumnOrdering?: boolean;
658
- enableColumnVirtualization?: boolean;
659
- enableDensityToggle?: boolean;
660
- enableEditing?: boolean | ((row: MRT_Row<TData>) => boolean);
661
- enableExpandAll?: boolean;
662
- enableFacetedValues?: boolean;
663
- enableFilterMatchHighlighting?: boolean;
664
- enableFullScreenToggle?: boolean;
665
- enableGlobalFilterModes?: boolean;
666
- enableGlobalFilterRankedResults?: boolean;
667
- enablePagination?: boolean;
668
- enableRowActions?: boolean;
669
- enableRowDragging?: boolean;
670
- enableRowNumbers?: boolean;
671
- enableRowOrdering?: boolean;
672
- enableRowSelection?: boolean | ((row: MRT_Row<TData>) => boolean);
673
- enableRowVirtualization?: boolean;
674
- enableSelectAll?: boolean;
675
- enableStickyFooter?: boolean;
676
- enableStickyHeader?: boolean;
677
- enableTableFooter?: boolean;
678
- enableTableHead?: boolean;
679
- enableToolbarInternalActions?: boolean;
680
- enableTopToolbar?: boolean;
681
- expandRowsFn?: (dataRow: TData) => TData[];
682
- getRowId?: (
683
- originalRow: TData,
684
- index: number,
685
- parentRow: MRT_Row<TData>,
686
- ) => string;
687
- globalFilterFn?: MRT_FilterOption;
688
- globalFilterModeOptions?: MRT_FilterOption[] | null;
689
- icons?: Partial<MRT_Icons>;
690
- initialState?: Partial<MRT_TableState<TData>>;
691
- /**
692
- * Changes which kind of CSS layout is used to render the table. `semantic` uses default semantic HTML elements, while `grid` adds CSS grid and flexbox styles
693
- */
694
- layoutMode?: 'semantic' | 'grid';
695
- /**
696
- * Pass in either a locale imported from `material-react-table/locales/*` or a custom locale object.
697
- *
698
- * See the localization (i18n) guide for more info:
699
- * @link https://www.material-react-table.com/docs/guides/localization
700
- */
701
- localization?: Partial<MRT_Localization>;
702
- /**
703
- * Memoize cells, rows, or the entire table body to potentially improve render performance.
704
- *
705
- * @warning This will break some dynamic rendering features. See the memoization guide for more info:
706
- * @link https://www.material-react-table.com/docs/guides/memoize-components
707
- */
708
- memoMode?: 'cells' | 'rows' | 'table-body';
709
- muiBottomToolbarProps?:
710
- | ToolbarProps
711
- | ((props: { table: MRT_TableInstance<TData> }) => ToolbarProps);
712
- muiExpandAllButtonProps?:
713
- | IconButtonProps
714
- | ((props: { table: MRT_TableInstance<TData> }) => IconButtonProps);
715
- muiExpandButtonProps?:
716
- | IconButtonProps
717
- | ((props: {
718
- table: MRT_TableInstance<TData>;
719
- row: MRT_Row<TData>;
720
- }) => IconButtonProps);
721
- muiLinearProgressProps?:
722
- | LinearProgressProps
723
- | ((props: {
724
- isTopToolbar: boolean;
725
- table: MRT_TableInstance<TData>;
726
- }) => LinearProgressProps);
727
- muiSearchTextFieldProps?:
728
- | TextFieldProps
729
- | ((props: { table: MRT_TableInstance<TData> }) => TextFieldProps);
730
- muiSelectAllCheckboxProps?:
731
- | CheckboxProps
732
- | ((props: { table: MRT_TableInstance<TData> }) => CheckboxProps);
733
- muiSelectCheckboxProps?:
734
- | (CheckboxProps | RadioProps)
735
- | ((props: {
736
- table: MRT_TableInstance<TData>;
737
- row: MRT_Row<TData>;
738
- }) => CheckboxProps | RadioProps);
739
- muiTableBodyCellCopyButtonProps?:
740
- | ButtonProps
741
- | ((props: {
742
- cell: MRT_Cell<TData>;
743
- column: MRT_Column<TData>;
744
- row: MRT_Row<TData>;
745
- table: MRT_TableInstance<TData>;
746
- }) => ButtonProps);
747
- muiTableBodyCellEditTextFieldProps?:
748
- | TextFieldProps
749
- | ((props: {
750
- cell: MRT_Cell<TData>;
751
- column: MRT_Column<TData>;
752
- row: MRT_Row<TData>;
753
- table: MRT_TableInstance<TData>;
754
- }) => TextFieldProps);
755
- muiTableBodyCellProps?:
756
- | TableCellProps
757
- | ((props: {
758
- cell: MRT_Cell<TData>;
759
- column: MRT_Column<TData>;
760
- row: MRT_Row<TData>;
761
- table: MRT_TableInstance<TData>;
762
- }) => TableCellProps);
763
- muiTableBodyCellSkeletonProps?:
764
- | SkeletonProps
765
- | ((props: {
766
- cell: MRT_Cell<TData>;
767
- column: MRT_Column<TData>;
768
- row: MRT_Row<TData>;
769
- table: MRT_TableInstance<TData>;
770
- }) => SkeletonProps);
771
- muiTableBodyProps?:
772
- | TableBodyProps
773
- | ((props: { table: MRT_TableInstance<TData> }) => TableBodyProps);
774
- muiTableBodyRowDragHandleProps?:
775
- | IconButtonProps
776
- | ((props: {
777
- table: MRT_TableInstance<TData>;
778
- row: MRT_Row<TData>;
779
- }) => IconButtonProps);
780
- muiTableBodyRowProps?:
781
- | TableRowProps
782
- | ((props: {
783
- isDetailPanel?: boolean;
784
- row: MRT_Row<TData>;
785
- staticRowIndex: number;
786
- table: MRT_TableInstance<TData>;
787
- }) => TableRowProps);
788
- muiTableContainerProps?:
789
- | TableContainerProps
790
- | ((props: { table: MRT_TableInstance<TData> }) => TableContainerProps);
791
- muiTableDetailPanelProps?:
792
- | TableCellProps
793
- | ((props: {
794
- table: MRT_TableInstance<TData>;
795
- row: MRT_Row<TData>;
796
- }) => TableCellProps);
797
- muiTableFooterCellProps?:
798
- | TableCellProps
799
- | ((props: {
800
- table: MRT_TableInstance<TData>;
801
- column: MRT_Column<TData>;
802
- }) => TableCellProps);
803
- muiTableFooterProps?:
804
- | TableFooterProps
805
- | ((props: { table: MRT_TableInstance<TData> }) => TableFooterProps);
806
- muiTableFooterRowProps?:
807
- | TableRowProps
808
- | ((props: {
809
- table: MRT_TableInstance<TData>;
810
- footerGroup: MRT_HeaderGroup<TData>;
811
- }) => TableRowProps);
812
- muiTableHeadCellColumnActionsButtonProps?:
813
- | IconButtonProps
814
- | ((props: {
815
- table: MRT_TableInstance<TData>;
816
- column: MRT_Column<TData>;
817
- }) => IconButtonProps);
818
- muiTableHeadCellDragHandleProps?:
819
- | IconButtonProps
820
- | ((props: {
821
- table: MRT_TableInstance<TData>;
822
- column: MRT_Column<TData>;
823
- }) => IconButtonProps);
824
- muiTableHeadCellFilterCheckboxProps?:
825
- | CheckboxProps
826
- | ((props: {
827
- column: MRT_Column<TData>;
828
- table: MRT_TableInstance<TData>;
829
- }) => CheckboxProps);
830
- muiTableHeadCellFilterTextFieldProps?:
831
- | TextFieldProps
832
- | ((props: {
833
- table: MRT_TableInstance<TData>;
834
- column: MRT_Column<TData>;
835
- rangeFilterIndex?: number;
836
- }) => TextFieldProps);
837
- muiTableHeadCellFilterSliderProps?:
838
- | SliderProps
839
- | ((props: {
840
- table: MRT_TableInstance<TData>;
841
- column: MRT_Column<TData>;
842
- }) => TextFieldProps);
843
- muiTableHeadCellProps?:
844
- | TableCellProps
845
- | ((props: {
846
- table: MRT_TableInstance<TData>;
847
- column: MRT_Column<TData>;
848
- }) => TableCellProps);
849
- muiTableHeadProps?:
850
- | TableHeadProps
851
- | ((props: { table: MRT_TableInstance<TData> }) => TableHeadProps);
852
- muiTableHeadRowProps?:
853
- | TableRowProps
854
- | ((props: {
855
- table: MRT_TableInstance<TData>;
856
- headerGroup: MRT_HeaderGroup<TData>;
857
- }) => TableRowProps);
858
- muiTablePaginationProps?:
859
- | Partial<Omit<TablePaginationProps, 'rowsPerPage'>>
860
- | ((props: {
861
- table: MRT_TableInstance<TData>;
862
- }) => Partial<Omit<TablePaginationProps, 'rowsPerPage'>>);
863
- muiTablePaperProps?:
864
- | PaperProps
865
- | ((props: { table: MRT_TableInstance<TData> }) => PaperProps);
866
- muiTableProps?:
867
- | TableProps
868
- | ((props: { table: MRT_TableInstance<TData> }) => TableProps);
869
- muiToolbarAlertBannerChipProps?:
870
- | ChipProps
871
- | ((props: { table: MRT_TableInstance<TData> }) => ChipProps);
872
- muiToolbarAlertBannerProps?:
873
- | AlertProps
874
- | ((props: { table: MRT_TableInstance<TData> }) => AlertProps);
875
- muiTopToolbarProps?:
876
- | ToolbarProps
877
- | ((props: { table: MRT_TableInstance<TData> }) => ToolbarProps);
878
- onDensityChange?: OnChangeFn<MRT_DensityState>;
879
- onDraggingColumnChange?: OnChangeFn<MRT_Column<TData> | null>;
880
- onDraggingRowChange?: OnChangeFn<MRT_Row<TData> | null>;
881
- onEditingCellChange?: OnChangeFn<MRT_Cell<TData> | null>;
882
- onEditingRowCancel?: (props: {
883
- row: MRT_Row<TData>;
884
- table: MRT_TableInstance<TData>;
885
- }) => void;
886
- onEditingRowSave?: (props: {
887
- exitEditingMode: () => void;
888
- row: MRT_Row<TData>;
889
- table: MRT_TableInstance<TData>;
890
- values: Record<LiteralUnion<string & DeepKeys<TData>>, any>;
891
- }) => Promise<void> | void;
892
- onEditingRowChange?: OnChangeFn<MRT_Row<TData> | null>;
893
- onColumnFilterFnsChange?: OnChangeFn<{ [key: string]: MRT_FilterOption }>;
894
- onGlobalFilterFnChange?: OnChangeFn<MRT_FilterOption>;
895
- onHoveredColumnChange?: OnChangeFn<MRT_Column<TData> | null>;
896
- onHoveredRowChange?: OnChangeFn<MRT_Row<TData> | null>;
897
- onIsFullScreenChange?: OnChangeFn<boolean>;
898
- onShowAlertBannerChange?: OnChangeFn<boolean>;
899
- onShowColumnFiltersChange?: OnChangeFn<boolean>;
900
- onShowGlobalFilterChange?: OnChangeFn<boolean>;
901
- onShowToolbarDropZoneChange?: OnChangeFn<boolean>;
902
- positionActionsColumn?: 'first' | 'last';
903
- positionExpandColumn?: 'first' | 'last';
904
- positionGlobalFilter?: 'left' | 'right' | 'none';
905
- positionPagination?: 'bottom' | 'top' | 'both' | 'none';
906
- positionToolbarAlertBanner?: 'bottom' | 'top' | 'none';
907
- positionToolbarDropZone?: 'bottom' | 'top' | 'none' | 'both';
908
- renderBottomToolbar?:
909
- | ReactNode
910
- | ((props: { table: MRT_TableInstance<TData> }) => ReactNode);
911
- renderBottomToolbarCustomActions?: (props: {
912
- table: MRT_TableInstance<TData>;
913
- }) => ReactNode;
914
- renderColumnActionsMenuItems?: (props: {
915
- column: MRT_Column<TData>;
916
- closeMenu: () => void;
917
- table: MRT_TableInstance<TData>;
918
- }) => ReactNode[];
919
- renderColumnFilterModeMenuItems?: (props: {
920
- column: MRT_Column<TData>;
921
- internalFilterOptions: MRT_InternalFilterOption[];
922
- onSelectFilterMode: (filterMode: MRT_FilterOption) => void;
923
- table: MRT_TableInstance<TData>;
924
- }) => ReactNode[];
925
- renderDetailPanel?: (props: {
926
- row: MRT_Row<TData>;
927
- table: MRT_TableInstance<TData>;
928
- }) => ReactNode;
929
- renderGlobalFilterModeMenuItems?: (props: {
930
- internalFilterOptions: MRT_InternalFilterOption[];
931
- onSelectFilterMode: (filterMode: MRT_FilterOption) => void;
932
- table: MRT_TableInstance<TData>;
933
- }) => ReactNode[];
934
- renderEmptyRowsFallback?: (props: {
935
- table: MRT_TableInstance<TData>;
936
- }) => ReactNode;
937
- renderRowActionMenuItems?: (props: {
938
- closeMenu: () => void;
939
- row: MRT_Row<TData>;
940
- table: MRT_TableInstance<TData>;
941
- }) => ReactNode[];
942
- renderRowActions?: (props: {
943
- cell: MRT_Cell<TData>;
944
- row: MRT_Row<TData>;
945
- table: MRT_TableInstance<TData>;
946
- }) => ReactNode;
947
- renderToolbarInternalActions?: (props: {
948
- table: MRT_TableInstance<TData>;
949
- }) => ReactNode;
950
- renderTopToolbar?:
951
- | ReactNode
952
- | ((props: { table: MRT_TableInstance<TData> }) => ReactNode);
953
- renderTopToolbarCustomActions?: (props: {
954
- table: MRT_TableInstance<TData>;
955
- }) => ReactNode;
956
- rowCount?: number;
957
- rowNumberMode?: 'original' | 'static';
958
- selectAllMode?: 'all' | 'page';
959
- /**
960
- * Manage state externally any way you want, then pass it back into MRT.
961
- */
962
- state?: Partial<MRT_TableState<TData>>;
963
- /**
964
- * Sequence of features important any dependent feature must be defined first
965
- */
966
- tableFeatures?: Array<MRT_CreateTableFeature<TData>>;
967
- /**
968
- * Get access to the table instance via a ref to read state or call built-in methods
969
- */
970
- tableInstanceRef?: MutableRefObject<MRT_TableInstance<TData> | null>;
971
- /**
972
- * @deprecated Use `rowVirtualizerInstanceRef` instead
973
- */
974
- virtualizerInstanceRef?: any;
975
- /**
976
- * @deprecated Use `rowVirtualizerProps` instead
977
- */
978
- virtualizerProps?: any;
979
- }
606
+ Omit<
607
+ Partial<TableOptions<TData>>,
608
+ | 'columns'
609
+ | 'data'
610
+ | 'defaultColumn'
611
+ | 'enableRowSelection'
612
+ | 'expandRowsFn'
613
+ | 'getRowId'
614
+ | 'globalFilterFn'
615
+ | 'initialState'
616
+ | 'onStateChange'
617
+ | 'state'
980
618
  > & {
619
+ columnFilterModeOptions?: Array<
620
+ LiteralUnion<string & MRT_FilterOption>
621
+ > | null;
622
+ /**
623
+ * The columns to display in the table. `accessorKey`s or `accessorFn`s must match keys in the `data` prop.
624
+ *
625
+ * See more info on creating columns on the official docs site:
626
+ * @link https://www.material-react-table.com/docs/guides/data-columns
627
+ * @link https://www.material-react-table.com/docs/guides/display-columns
628
+ *
629
+ * See all Columns Options on the official docs site:
630
+ * @link https://www.material-react-table.com/docs/api/column-options
631
+ */
632
+ columns: MRT_ColumnDef<TData>[];
633
+ /**
634
+ * Pass your data as an array of objects. Objects can theoretically be any shape, but it's best to keep them consistent.
635
+ *
636
+ * See the usage guide for more info on creating columns and data:
637
+ * @link https://www.material-react-table.com/docs/getting-started/usage
638
+ */
639
+ data: TData[];
640
+ /**
641
+ * Instead of specifying a bunch of the same options for each column, you can just change an option in the `defaultColumn` prop to change a default option for all columns.
642
+ */
643
+ defaultColumn?: Partial<MRT_ColumnDef<TData>>;
644
+ /**
645
+ * Change the default options for display columns.
646
+ */
647
+ defaultDisplayColumn?: Partial<MRT_ColumnDef<TData>>;
648
+ displayColumnDefOptions?: Partial<{
649
+ [key in MRT_DisplayColumnIds]: Partial<MRT_ColumnDef>;
650
+ }>;
651
+ editingMode?: 'table' | 'modal' | 'row' | 'cell';
652
+ enableBottomToolbar?: boolean;
653
+ enableClickToCopy?: boolean;
654
+ enableColumnActions?: boolean;
655
+ enableColumnDragging?: boolean;
656
+ enableColumnFilterModes?: boolean;
657
+ enableColumnOrdering?: boolean;
658
+ enableColumnVirtualization?: boolean;
659
+ enableDensityToggle?: boolean;
660
+ enableEditing?: boolean | ((row: MRT_Row<TData>) => boolean);
661
+ enableExpandAll?: boolean;
662
+ enableFacetedValues?: boolean;
663
+ enableFilterMatchHighlighting?: boolean;
664
+ enableFullScreenToggle?: boolean;
665
+ enableGlobalFilterModes?: boolean;
666
+ enableGlobalFilterRankedResults?: boolean;
667
+ enablePagination?: boolean;
668
+ enableRowActions?: boolean;
669
+ enableRowDragging?: boolean;
670
+ enableRowNumbers?: boolean;
671
+ enableRowOrdering?: boolean;
672
+ enableRowSelection?: boolean | ((row: MRT_Row<TData>) => boolean);
673
+ enableRowVirtualization?: boolean;
674
+ enableSelectAll?: boolean;
675
+ enableStickyFooter?: boolean;
676
+ enableStickyHeader?: boolean;
677
+ enableTableFooter?: boolean;
678
+ enableTableHead?: boolean;
679
+ enableToolbarInternalActions?: boolean;
680
+ enableTopToolbar?: boolean;
681
+ expandRowsFn?: (dataRow: TData) => TData[];
682
+ getRowId?: (
683
+ originalRow: TData,
684
+ index: number,
685
+ parentRow: MRT_Row<TData>,
686
+ ) => string;
687
+ globalFilterFn?: MRT_FilterOption;
688
+ globalFilterModeOptions?: MRT_FilterOption[] | null;
689
+ icons?: Partial<MRT_Icons>;
690
+ initialState?: Partial<MRT_TableState<TData>>;
691
+ /**
692
+ * Changes which kind of CSS layout is used to render the table. `semantic` uses default semantic HTML elements, while `grid` adds CSS grid and flexbox styles
693
+ */
694
+ layoutMode?: 'semantic' | 'grid';
695
+ /**
696
+ * Pass in either a locale imported from `material-react-table/locales/*` or a custom locale object.
697
+ *
698
+ * See the localization (i18n) guide for more info:
699
+ * @link https://www.material-react-table.com/docs/guides/localization
700
+ */
701
+ localization?: Partial<MRT_Localization>;
702
+ /**
703
+ * Memoize cells, rows, or the entire table body to potentially improve render performance.
704
+ *
705
+ * @warning This will break some dynamic rendering features. See the memoization guide for more info:
706
+ * @link https://www.material-react-table.com/docs/guides/memoize-components
707
+ */
708
+ memoMode?: 'cells' | 'rows' | 'table-body';
709
+ muiBottomToolbarProps?:
710
+ | ToolbarProps
711
+ | ((props: { table: MRT_TableInstance<TData> }) => ToolbarProps);
712
+ muiExpandAllButtonProps?:
713
+ | IconButtonProps
714
+ | ((props: { table: MRT_TableInstance<TData> }) => IconButtonProps);
715
+ muiExpandButtonProps?:
716
+ | IconButtonProps
717
+ | ((props: {
718
+ table: MRT_TableInstance<TData>;
719
+ row: MRT_Row<TData>;
720
+ }) => IconButtonProps);
721
+ muiLinearProgressProps?:
722
+ | LinearProgressProps
723
+ | ((props: {
724
+ isTopToolbar: boolean;
725
+ table: MRT_TableInstance<TData>;
726
+ }) => LinearProgressProps);
727
+ muiSearchTextFieldProps?:
728
+ | TextFieldProps
729
+ | ((props: { table: MRT_TableInstance<TData> }) => TextFieldProps);
730
+ muiSelectAllCheckboxProps?:
731
+ | CheckboxProps
732
+ | ((props: { table: MRT_TableInstance<TData> }) => CheckboxProps);
733
+ muiSelectCheckboxProps?:
734
+ | (CheckboxProps | RadioProps)
735
+ | ((props: {
736
+ table: MRT_TableInstance<TData>;
737
+ row: MRT_Row<TData>;
738
+ }) => CheckboxProps | RadioProps);
739
+ muiTableBodyCellCopyButtonProps?:
740
+ | ButtonProps
741
+ | ((props: {
742
+ cell: MRT_Cell<TData>;
743
+ column: MRT_Column<TData>;
744
+ row: MRT_Row<TData>;
745
+ table: MRT_TableInstance<TData>;
746
+ }) => ButtonProps);
747
+ muiTableBodyCellEditTextFieldProps?:
748
+ | TextFieldProps
749
+ | ((props: {
750
+ cell: MRT_Cell<TData>;
751
+ column: MRT_Column<TData>;
752
+ row: MRT_Row<TData>;
753
+ table: MRT_TableInstance<TData>;
754
+ }) => TextFieldProps);
755
+ muiTableBodyCellProps?:
756
+ | TableCellProps
757
+ | ((props: {
758
+ cell: MRT_Cell<TData>;
759
+ column: MRT_Column<TData>;
760
+ row: MRT_Row<TData>;
761
+ table: MRT_TableInstance<TData>;
762
+ }) => TableCellProps);
763
+ muiTableBodyCellSkeletonProps?:
764
+ | SkeletonProps
765
+ | ((props: {
766
+ cell: MRT_Cell<TData>;
767
+ column: MRT_Column<TData>;
768
+ row: MRT_Row<TData>;
769
+ table: MRT_TableInstance<TData>;
770
+ }) => SkeletonProps);
771
+ muiTableBodyProps?:
772
+ | TableBodyProps
773
+ | ((props: { table: MRT_TableInstance<TData> }) => TableBodyProps);
774
+ muiTableBodyRowDragHandleProps?:
775
+ | IconButtonProps
776
+ | ((props: {
777
+ table: MRT_TableInstance<TData>;
778
+ row: MRT_Row<TData>;
779
+ }) => IconButtonProps);
780
+ muiTableBodyRowProps?:
781
+ | TableRowProps
782
+ | ((props: {
783
+ isDetailPanel?: boolean;
784
+ row: MRT_Row<TData>;
785
+ staticRowIndex: number;
786
+ table: MRT_TableInstance<TData>;
787
+ }) => TableRowProps);
788
+ muiTableContainerProps?:
789
+ | TableContainerProps
790
+ | ((props: { table: MRT_TableInstance<TData> }) => TableContainerProps);
791
+ muiTableDetailPanelProps?:
792
+ | TableCellProps
793
+ | ((props: {
794
+ table: MRT_TableInstance<TData>;
795
+ row: MRT_Row<TData>;
796
+ }) => TableCellProps);
797
+ muiTableFooterCellProps?:
798
+ | TableCellProps
799
+ | ((props: {
800
+ table: MRT_TableInstance<TData>;
801
+ column: MRT_Column<TData>;
802
+ }) => TableCellProps);
803
+ muiTableFooterProps?:
804
+ | TableFooterProps
805
+ | ((props: { table: MRT_TableInstance<TData> }) => TableFooterProps);
806
+ muiTableFooterRowProps?:
807
+ | TableRowProps
808
+ | ((props: {
809
+ table: MRT_TableInstance<TData>;
810
+ footerGroup: MRT_HeaderGroup<TData>;
811
+ }) => TableRowProps);
812
+ muiTableHeadCellColumnActionsButtonProps?:
813
+ | IconButtonProps
814
+ | ((props: {
815
+ table: MRT_TableInstance<TData>;
816
+ column: MRT_Column<TData>;
817
+ }) => IconButtonProps);
818
+ muiTableHeadCellDragHandleProps?:
819
+ | IconButtonProps
820
+ | ((props: {
821
+ table: MRT_TableInstance<TData>;
822
+ column: MRT_Column<TData>;
823
+ }) => IconButtonProps);
824
+ muiTableHeadCellFilterCheckboxProps?:
825
+ | CheckboxProps
826
+ | ((props: {
827
+ column: MRT_Column<TData>;
828
+ table: MRT_TableInstance<TData>;
829
+ }) => CheckboxProps);
830
+ muiTableHeadCellFilterTextFieldProps?:
831
+ | TextFieldProps
832
+ | ((props: {
833
+ table: MRT_TableInstance<TData>;
834
+ column: MRT_Column<TData>;
835
+ rangeFilterIndex?: number;
836
+ }) => TextFieldProps);
837
+ muiTableHeadCellFilterSliderProps?:
838
+ | SliderProps
839
+ | ((props: {
840
+ table: MRT_TableInstance<TData>;
841
+ column: MRT_Column<TData>;
842
+ }) => TextFieldProps);
843
+ muiTableHeadCellProps?:
844
+ | TableCellProps
845
+ | ((props: {
846
+ table: MRT_TableInstance<TData>;
847
+ column: MRT_Column<TData>;
848
+ }) => TableCellProps);
849
+ muiTableHeadProps?:
850
+ | TableHeadProps
851
+ | ((props: { table: MRT_TableInstance<TData> }) => TableHeadProps);
852
+ muiTableHeadRowProps?:
853
+ | TableRowProps
854
+ | ((props: {
855
+ table: MRT_TableInstance<TData>;
856
+ headerGroup: MRT_HeaderGroup<TData>;
857
+ }) => TableRowProps);
858
+ muiTablePaginationProps?:
859
+ | Partial<Omit<TablePaginationProps, 'rowsPerPage'>>
860
+ | ((props: {
861
+ table: MRT_TableInstance<TData>;
862
+ }) => Partial<Omit<TablePaginationProps, 'rowsPerPage'>>);
863
+ muiTablePaperProps?:
864
+ | PaperProps
865
+ | ((props: { table: MRT_TableInstance<TData> }) => PaperProps);
866
+ muiTableProps?:
867
+ | TableProps
868
+ | ((props: { table: MRT_TableInstance<TData> }) => TableProps);
869
+ muiToolbarAlertBannerChipProps?:
870
+ | ChipProps
871
+ | ((props: { table: MRT_TableInstance<TData> }) => ChipProps);
872
+ muiToolbarAlertBannerProps?:
873
+ | AlertProps
874
+ | ((props: { table: MRT_TableInstance<TData> }) => AlertProps);
875
+ muiTopToolbarProps?:
876
+ | ToolbarProps
877
+ | ((props: { table: MRT_TableInstance<TData> }) => ToolbarProps);
878
+ onDensityChange?: OnChangeFn<MRT_DensityState>;
879
+ onDraggingColumnChange?: OnChangeFn<MRT_Column<TData> | null>;
880
+ onDraggingRowChange?: OnChangeFn<MRT_Row<TData> | null>;
881
+ onEditingCellChange?: OnChangeFn<MRT_Cell<TData> | null>;
882
+ onEditingRowCancel?: (props: {
883
+ row: MRT_Row<TData>;
884
+ table: MRT_TableInstance<TData>;
885
+ }) => void;
886
+ onEditingRowSave?: (props: {
887
+ exitEditingMode: () => void;
888
+ row: MRT_Row<TData>;
889
+ table: MRT_TableInstance<TData>;
890
+ values: Record<LiteralUnion<string & DeepKeys<TData>>, any>;
891
+ }) => Promise<void> | void;
892
+ onEditingRowChange?: OnChangeFn<MRT_Row<TData> | null>;
893
+ onColumnFilterFnsChange?: OnChangeFn<{ [key: string]: MRT_FilterOption }>;
894
+ onGlobalFilterFnChange?: OnChangeFn<MRT_FilterOption>;
895
+ onHoveredColumnChange?: OnChangeFn<MRT_Column<TData> | null>;
896
+ onHoveredRowChange?: OnChangeFn<MRT_Row<TData> | null>;
897
+ onIsFullScreenChange?: OnChangeFn<boolean>;
898
+ onShowAlertBannerChange?: OnChangeFn<boolean>;
899
+ onShowColumnFiltersChange?: OnChangeFn<boolean>;
900
+ onShowGlobalFilterChange?: OnChangeFn<boolean>;
901
+ onShowToolbarDropZoneChange?: OnChangeFn<boolean>;
902
+ positionActionsColumn?: 'first' | 'last';
903
+ positionExpandColumn?: 'first' | 'last';
904
+ positionGlobalFilter?: 'left' | 'right' | 'none';
905
+ positionPagination?: 'bottom' | 'top' | 'both' | 'none';
906
+ positionToolbarAlertBanner?: 'bottom' | 'top' | 'none';
907
+ positionToolbarDropZone?: 'bottom' | 'top' | 'none' | 'both';
908
+ renderBottomToolbar?:
909
+ | ReactNode
910
+ | ((props: { table: MRT_TableInstance<TData> }) => ReactNode);
911
+ renderBottomToolbarCustomActions?: (props: {
912
+ table: MRT_TableInstance<TData>;
913
+ }) => ReactNode;
914
+ renderColumnActionsMenuItems?: (props: {
915
+ column: MRT_Column<TData>;
916
+ closeMenu: () => void;
917
+ internalColumnMenuItems: ReactNode[];
918
+ table: MRT_TableInstance<TData>;
919
+ }) => ReactNode[];
920
+ renderColumnFilterModeMenuItems?: (props: {
921
+ column: MRT_Column<TData>;
922
+ internalFilterOptions: MRT_InternalFilterOption[];
923
+ onSelectFilterMode: (filterMode: MRT_FilterOption) => void;
924
+ table: MRT_TableInstance<TData>;
925
+ }) => ReactNode[];
926
+ renderDetailPanel?: (props: {
927
+ row: MRT_Row<TData>;
928
+ table: MRT_TableInstance<TData>;
929
+ }) => ReactNode;
930
+ renderGlobalFilterModeMenuItems?: (props: {
931
+ internalFilterOptions: MRT_InternalFilterOption[];
932
+ onSelectFilterMode: (filterMode: MRT_FilterOption) => void;
933
+ table: MRT_TableInstance<TData>;
934
+ }) => ReactNode[];
935
+ renderEmptyRowsFallback?: (props: {
936
+ table: MRT_TableInstance<TData>;
937
+ }) => ReactNode;
938
+ renderRowActionMenuItems?: (props: {
939
+ closeMenu: () => void;
940
+ row: MRT_Row<TData>;
941
+ table: MRT_TableInstance<TData>;
942
+ }) => ReactNode[];
943
+ renderRowActions?: (props: {
944
+ cell: MRT_Cell<TData>;
945
+ row: MRT_Row<TData>;
946
+ table: MRT_TableInstance<TData>;
947
+ }) => ReactNode;
948
+ renderToolbarInternalActions?: (props: {
949
+ table: MRT_TableInstance<TData>;
950
+ }) => ReactNode;
951
+ renderTopToolbar?:
952
+ | ReactNode
953
+ | ((props: { table: MRT_TableInstance<TData> }) => ReactNode);
954
+ renderTopToolbarCustomActions?: (props: {
955
+ table: MRT_TableInstance<TData>;
956
+ }) => ReactNode;
957
+ rowCount?: number;
958
+ rowNumberMode?: 'original' | 'static';
959
+ selectAllMode?: 'all' | 'page';
960
+ /**
961
+ * Manage state externally any way you want, then pass it back into MRT.
962
+ */
963
+ state?: Partial<MRT_TableState<TData>>;
964
+ /**
965
+ * Sequence of features important any dependent feature must be defined first
966
+ */
967
+ tableFeatures?: Array<MRT_CreateTableFeature<TData>>;
968
+ /**
969
+ * Get access to the table instance via a ref to read state or call built-in methods
970
+ */
971
+ tableInstanceRef?: MutableRefObject<MRT_TableInstance<TData> | null>;
972
+ /**
973
+ * @deprecated Use `rowVirtualizerInstanceRef` instead
974
+ */
975
+ virtualizerInstanceRef?: any;
976
+ /**
977
+ * @deprecated Use `rowVirtualizerProps` instead
978
+ */
979
+ virtualizerProps?: any;
980
+ } & {
981
981
  columnVirtualizerInstanceRef?: MutableRefObject<Virtualizer<
982
982
  HTMLDivElement,
983
983
  HTMLTableCellElement