material-react-table 2.0.0-alpha.4 → 2.0.0-alpha.5
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/dist/cjs/index.js +447 -418
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/icons.d.ts +1 -1
- package/dist/cjs/types/locales/hy.d.ts +2 -0
- package/dist/cjs/types/toolbar/MRT_ToolbarAlertBanner.d.ts +1 -1
- package/dist/cjs/types/types.d.ts +16 -11
- package/dist/esm/material-react-table.esm.js +420 -391
- package/dist/esm/material-react-table.esm.js.map +1 -1
- package/dist/esm/types/icons.d.ts +1 -1
- package/dist/esm/types/locales/hy.d.ts +2 -0
- package/dist/esm/types/toolbar/MRT_ToolbarAlertBanner.d.ts +1 -1
- package/dist/esm/types/types.d.ts +16 -11
- package/dist/index.d.ts +18 -13
- package/locales/hy.d.ts +2 -0
- package/locales/hy.esm.d.ts +2 -0
- package/locales/hy.esm.js +93 -0
- package/locales/hy.esm.js.map +1 -0
- package/locales/hy.js +97 -0
- package/locales/hy.js.map +1 -0
- package/package.json +7 -7
- package/src/body/MRT_TableBody.tsx +13 -21
- package/src/body/MRT_TableBodyCell.tsx +2 -2
- package/src/body/MRT_TableBodyRow.tsx +3 -3
- package/src/body/MRT_TableDetailPanel.tsx +3 -3
- package/src/buttons/MRT_GrabHandleButton.tsx +1 -2
- package/src/buttons/MRT_ShowHideColumnsButton.tsx +1 -2
- package/src/buttons/MRT_ToggleDensePaddingButton.tsx +1 -2
- package/src/buttons/MRT_ToggleFiltersButton.tsx +1 -2
- package/src/buttons/MRT_ToggleFullScreenButton.tsx +2 -3
- package/src/column.utils.ts +15 -9
- package/src/footer/MRT_TableFooter.tsx +1 -1
- package/src/footer/MRT_TableFooterCell.tsx +1 -1
- package/src/footer/MRT_TableFooterRow.tsx +2 -2
- package/src/head/MRT_TableHead.tsx +36 -14
- package/src/head/MRT_TableHeadCell.tsx +1 -1
- package/src/head/MRT_TableHeadRow.tsx +2 -2
- package/src/hooks/useMRT_TableOptions.ts +7 -2
- package/src/icons.ts +3 -3
- package/src/locales/hy.ts +93 -0
- package/src/table/MRT_Table.tsx +4 -2
- package/src/toolbar/MRT_TablePagination.tsx +24 -14
- package/src/toolbar/MRT_ToolbarAlertBanner.tsx +53 -15
- package/src/toolbar/MRT_TopToolbar.tsx +1 -1
- package/src/types.ts +20 -15
@@ -1,6 +1,6 @@
|
|
1
1
|
import { type MRT_TableInstance } from '../types';
|
2
2
|
interface Props<TData extends Record<string, any>> {
|
3
|
-
stackAlertBanner
|
3
|
+
stackAlertBanner?: boolean;
|
4
4
|
table: MRT_TableInstance<TData>;
|
5
5
|
}
|
6
6
|
export declare const MRT_ToolbarAlertBanner: <TData extends Record<string, any>>({ stackAlertBanner, table, }: Props<TData>) => import("react/jsx-runtime").JSX.Element;
|
@@ -530,7 +530,7 @@ export type MRT_TableOptions<TData extends Record<string, any>> = Omit<Partial<T
|
|
530
530
|
/**
|
531
531
|
* 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
|
532
532
|
*/
|
533
|
-
layoutMode?: 'grid' | 'semantic';
|
533
|
+
layoutMode?: 'grid' | 'grid-no-grow' | 'semantic';
|
534
534
|
/**
|
535
535
|
* Pass in either a locale imported from `material-react-table/locales/*` or a custom locale object.
|
536
536
|
*
|
@@ -613,6 +613,15 @@ export type MRT_TableOptions<TData extends Record<string, any>> = Omit<Partial<T
|
|
613
613
|
isTopToolbar: boolean;
|
614
614
|
table: MRT_TableInstance<TData>;
|
615
615
|
}) => LinearProgressProps) | LinearProgressProps;
|
616
|
+
muiPaginationProps?: ((props: {
|
617
|
+
table: MRT_TableInstance<TData>;
|
618
|
+
}) => Partial<PaginationProps & {
|
619
|
+
rowsPerPageOptions?: number[];
|
620
|
+
showRowsPerPage?: boolean;
|
621
|
+
}>) | Partial<PaginationProps & {
|
622
|
+
rowsPerPageOptions?: number[];
|
623
|
+
showRowsPerPage?: boolean;
|
624
|
+
}>;
|
616
625
|
muiRowDragHandleProps?: ((props: {
|
617
626
|
row: MRT_Row<TData>;
|
618
627
|
table: MRT_TableInstance<TData>;
|
@@ -673,15 +682,6 @@ export type MRT_TableOptions<TData extends Record<string, any>> = Omit<Partial<T
|
|
673
682
|
headerGroup: MRT_HeaderGroup<TData>;
|
674
683
|
table: MRT_TableInstance<TData>;
|
675
684
|
}) => TableRowProps) | TableRowProps;
|
676
|
-
muiTablePaginationProps?: ((props: {
|
677
|
-
table: MRT_TableInstance<TData>;
|
678
|
-
}) => Partial<PaginationProps & {
|
679
|
-
rowsPerPageOptions?: number[];
|
680
|
-
showRowsPerPage?: boolean;
|
681
|
-
}>) | Partial<PaginationProps & {
|
682
|
-
rowsPerPageOptions?: number[];
|
683
|
-
showRowsPerPage?: boolean;
|
684
|
-
}>;
|
685
685
|
muiTablePaperProps?: ((props: {
|
686
686
|
table: MRT_TableInstance<TData>;
|
687
687
|
}) => PaperProps) | PaperProps;
|
@@ -743,7 +743,7 @@ export type MRT_TableOptions<TData extends Record<string, any>> = Omit<Partial<T
|
|
743
743
|
positionExpandColumn?: 'first' | 'last';
|
744
744
|
positionGlobalFilter?: 'left' | 'none' | 'right';
|
745
745
|
positionPagination?: 'both' | 'bottom' | 'none' | 'top';
|
746
|
-
positionToolbarAlertBanner?: 'bottom' | 'none' | 'top';
|
746
|
+
positionToolbarAlertBanner?: 'bottom' | 'head-overlay' | 'none' | 'top';
|
747
747
|
positionToolbarDropZone?: 'both' | 'bottom' | 'none' | 'top';
|
748
748
|
renderBottomToolbar?: ((props: {
|
749
749
|
table: MRT_TableInstance<TData>;
|
@@ -795,6 +795,11 @@ export type MRT_TableOptions<TData extends Record<string, any>> = Omit<Partial<T
|
|
795
795
|
row: MRT_Row<TData>;
|
796
796
|
table: MRT_TableInstance<TData>;
|
797
797
|
}) => ReactNode;
|
798
|
+
renderToolbarAlertBannerContent?: (props: {
|
799
|
+
groupedAlert: ReactNode | null;
|
800
|
+
selectedAlert: ReactNode | null;
|
801
|
+
table: MRT_TableInstance<TData>;
|
802
|
+
}) => ReactNode;
|
798
803
|
renderToolbarInternalActions?: (props: {
|
799
804
|
table: MRT_TableInstance<TData>;
|
800
805
|
}) => ReactNode;
|