material-react-table 2.1.0 → 2.2.0
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/index.d.ts +13 -4
- package/dist/index.esm.js +2360 -2325
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +2393 -2355
- package/dist/index.js.map +1 -1
- package/package.json +19 -19
- package/src/body/MRT_TableBody.tsx +16 -123
- package/src/body/MRT_TableBodyCell.tsx +3 -3
- package/src/body/MRT_TableBodyRow.tsx +9 -5
- package/src/hooks/index.ts +3 -0
- package/src/hooks/useMRT_ColumnVirtualizer.ts +125 -0
- package/src/hooks/useMRT_DisplayColumns.tsx +2 -0
- package/src/hooks/useMRT_RowVirtualizer.ts +64 -0
- package/src/hooks/useMRT_Rows.ts +94 -0
- package/src/table/MRT_Table.tsx +17 -107
package/dist/index.d.ts
CHANGED
@@ -1009,10 +1009,10 @@ interface Props$S<TData extends MRT_RowData> extends TableCellProps {
|
|
1009
1009
|
rowIndex: number;
|
1010
1010
|
rowRef: RefObject<HTMLTableRowElement>;
|
1011
1011
|
table: MRT_TableInstance<TData>;
|
1012
|
-
|
1012
|
+
virtualColumnIndex?: number;
|
1013
1013
|
}
|
1014
|
-
declare const MRT_TableBodyCell: <TData extends MRT_RowData>({ cell, measureElement, numRows, rowIndex, rowRef, table,
|
1015
|
-
declare const Memo_MRT_TableBodyCell: <TData extends MRT_RowData>({ cell, measureElement, numRows, rowIndex, rowRef, table,
|
1014
|
+
declare const MRT_TableBodyCell: <TData extends MRT_RowData>({ cell, measureElement, numRows, rowIndex, rowRef, table, virtualColumnIndex, ...rest }: Props$S<TData>) => react_jsx_runtime.JSX.Element;
|
1015
|
+
declare const Memo_MRT_TableBodyCell: <TData extends MRT_RowData>({ cell, measureElement, numRows, rowIndex, rowRef, table, virtualColumnIndex, ...rest }: Props$S<TData>) => react_jsx_runtime.JSX.Element;
|
1016
1016
|
|
1017
1017
|
interface Props$R<TData extends MRT_RowData> {
|
1018
1018
|
cell: MRT_Cell<TData>;
|
@@ -1340,6 +1340,11 @@ interface Props$o<TData extends MRT_RowData> extends TableRowProps {
|
|
1340
1340
|
}
|
1341
1341
|
declare const MRT_TableHeadRow: <TData extends MRT_RowData>({ headerGroup, table, virtualColumns, virtualPaddingLeft, virtualPaddingRight, ...rest }: Props$o<TData>) => react_jsx_runtime.JSX.Element;
|
1342
1342
|
|
1343
|
+
declare const useMRT_ColumnVirtualizer: <TData extends MRT_RowData, TScrollElement extends Element | Window = HTMLDivElement, TItemElement extends Element = HTMLTableCellElement>(table: MRT_TableInstance<TData>) => (Virtualizer<TScrollElement, TItemElement> & {
|
1344
|
+
virtualPaddingLeft?: number | undefined;
|
1345
|
+
virtualPaddingRight?: number | undefined;
|
1346
|
+
}) | undefined;
|
1347
|
+
|
1343
1348
|
interface Params<TData extends MRT_RowData> {
|
1344
1349
|
columnOrder: ColumnOrderState;
|
1345
1350
|
creatingRow: MRT_Row<TData> | null;
|
@@ -1350,6 +1355,10 @@ declare const useMRT_DisplayColumns: <TData extends MRT_RowData>(params: Params<
|
|
1350
1355
|
|
1351
1356
|
declare const useMRT_Effects: <TData extends MRT_RowData>(table: MRT_TableInstance<TData>) => void;
|
1352
1357
|
|
1358
|
+
declare const useMRT_RowVirtualizer: <TData extends MRT_RowData, TScrollElement extends Element | Window = HTMLDivElement, TItemElement extends Element = HTMLTableRowElement>(table: MRT_TableInstance<TData>) => Virtualizer<TScrollElement, TItemElement> | undefined;
|
1359
|
+
|
1360
|
+
declare const useMRT_Rows: <TData extends MRT_RowData>(table: MRT_TableInstance<TData>) => MRT_Row<TData>[];
|
1361
|
+
|
1353
1362
|
declare const useMRT_TableInstance: <TData extends MRT_RowData>(tableOptions: MRT_DefinedTableOptions<TData>) => MRT_TableInstance<TData>;
|
1354
1363
|
|
1355
1364
|
declare const MRT_DefaultColumn: {
|
@@ -1575,4 +1584,4 @@ declare const MRT_TopToolbar: <TData extends MRT_RowData>({ table, }: Props<TDat
|
|
1575
1584
|
|
1576
1585
|
declare const useMaterialReactTable: <TData extends MRT_RowData>(tableOptions: MRT_TableOptions<TData>) => MRT_TableInstance<TData>;
|
1577
1586
|
|
1578
|
-
export { type LiteralUnion, type MRT_AggregationFn, MRT_AggregationFns, type MRT_AggregationOption, MRT_BottomToolbar, type MRT_Cell, type MRT_Column, MRT_ColumnActionMenu, type MRT_ColumnDef, type MRT_ColumnFilterFnsState, type MRT_ColumnHelper, MRT_ColumnPinningButtons, MRT_CopyButton, MRT_DefaultColumn, MRT_DefaultDisplayColumn, type MRT_DefinedColumnDef, type MRT_DefinedTableOptions, type MRT_DensityState, type MRT_DisplayColumnDef, type MRT_DisplayColumnIds, MRT_EditActionButtons, MRT_EditCellTextField, MRT_EditRowModal, MRT_ExpandAllButton, MRT_ExpandButton, MRT_FilterCheckbox, type MRT_FilterFn, MRT_FilterFns, type MRT_FilterOption, MRT_FilterOptionMenu, MRT_FilterRangeFields, MRT_FilterRangeSlider, MRT_FilterTextField, MRT_GlobalFilterTextField, MRT_GrabHandleButton, type MRT_GroupColumnDef, type MRT_Header, type MRT_HeaderGroup, type MRT_Icons, type MRT_InternalFilterOption, MRT_LinearProgressBar, type MRT_Localization, type MRT_Row, MRT_RowActionMenu, type MRT_RowData, type MRT_RowModel, MRT_RowPinButton, MRT_SelectCheckbox, MRT_ShowHideColumnsButton, MRT_ShowHideColumnsMenu, MRT_ShowHideColumnsMenuItems, type MRT_SortingFn, MRT_SortingFns, type MRT_SortingOption, MRT_Table, MRT_TableBody, MRT_TableBodyCell, MRT_TableBodyCellValue, MRT_TableBodyRow, MRT_TableBodyRowGrabHandle, MRT_TableBodyRowPinButton, MRT_TableContainer, MRT_TableDetailPanel, MRT_TableFooter, MRT_TableFooterCell, MRT_TableFooterRow, MRT_TableHead, MRT_TableHeadCell, MRT_TableHeadCellColumnActionsButton, MRT_TableHeadCellFilterContainer, MRT_TableHeadCellFilterLabel, MRT_TableHeadCellGrabHandle, MRT_TableHeadCellResizeHandle, MRT_TableHeadCellSortLabel, MRT_TableHeadRow, type MRT_TableInstance, MRT_TableLoadingOverlay, type MRT_TableOptions, MRT_TablePagination, MRT_TablePaper, type MRT_TableState, type MRT_Theme, MRT_ToggleDensePaddingButton, MRT_ToggleFiltersButton, MRT_ToggleFullScreenButton, MRT_ToggleGlobalFilterButton, MRT_ToggleRowActionMenuButton, MRT_ToolbarAlertBanner, MRT_ToolbarDropZone, MRT_ToolbarInternalButtons, MRT_TopToolbar, MaterialReactTable, Memo_MRT_TableBody, Memo_MRT_TableBodyCell, Memo_MRT_TableBodyRow, type Prettify, type Xor, commonListItemStyles, commonMenuItemStyles, createMRTColumnHelper, createRow, extraIndexRangeExtractor, flexRender, getAllLeafColumnDefs, getCanRankRows, getColumnId, getCommonMRTCellStyles, getCommonToolbarStyles, getDefaultColumnFilterFn, getDefaultColumnOrderIds, getIsFirstColumn, getIsFirstRightPinnedColumn, getIsLastColumn, getIsLastLeftPinnedColumn, getLeadingDisplayColumnIds, getMRTTheme, getTotalRight, getTrailingDisplayColumnIds, getValueAndLabel, mrtFilterOptions, parseCSSVarId, parseFromValuesOrFunc, prepareColumns, rankGlobalFuzzy, reorderColumn, showExpandColumn, useMRT_DisplayColumns, useMRT_Effects, useMRT_TableInstance, useMRT_TableOptions, useMaterialReactTable };
|
1587
|
+
export { type LiteralUnion, type MRT_AggregationFn, MRT_AggregationFns, type MRT_AggregationOption, MRT_BottomToolbar, type MRT_Cell, type MRT_Column, MRT_ColumnActionMenu, type MRT_ColumnDef, type MRT_ColumnFilterFnsState, type MRT_ColumnHelper, MRT_ColumnPinningButtons, MRT_CopyButton, MRT_DefaultColumn, MRT_DefaultDisplayColumn, type MRT_DefinedColumnDef, type MRT_DefinedTableOptions, type MRT_DensityState, type MRT_DisplayColumnDef, type MRT_DisplayColumnIds, MRT_EditActionButtons, MRT_EditCellTextField, MRT_EditRowModal, MRT_ExpandAllButton, MRT_ExpandButton, MRT_FilterCheckbox, type MRT_FilterFn, MRT_FilterFns, type MRT_FilterOption, MRT_FilterOptionMenu, MRT_FilterRangeFields, MRT_FilterRangeSlider, MRT_FilterTextField, MRT_GlobalFilterTextField, MRT_GrabHandleButton, type MRT_GroupColumnDef, type MRT_Header, type MRT_HeaderGroup, type MRT_Icons, type MRT_InternalFilterOption, MRT_LinearProgressBar, type MRT_Localization, type MRT_Row, MRT_RowActionMenu, type MRT_RowData, type MRT_RowModel, MRT_RowPinButton, MRT_SelectCheckbox, MRT_ShowHideColumnsButton, MRT_ShowHideColumnsMenu, MRT_ShowHideColumnsMenuItems, type MRT_SortingFn, MRT_SortingFns, type MRT_SortingOption, MRT_Table, MRT_TableBody, MRT_TableBodyCell, MRT_TableBodyCellValue, MRT_TableBodyRow, MRT_TableBodyRowGrabHandle, MRT_TableBodyRowPinButton, MRT_TableContainer, MRT_TableDetailPanel, MRT_TableFooter, MRT_TableFooterCell, MRT_TableFooterRow, MRT_TableHead, MRT_TableHeadCell, MRT_TableHeadCellColumnActionsButton, MRT_TableHeadCellFilterContainer, MRT_TableHeadCellFilterLabel, MRT_TableHeadCellGrabHandle, MRT_TableHeadCellResizeHandle, MRT_TableHeadCellSortLabel, MRT_TableHeadRow, type MRT_TableInstance, MRT_TableLoadingOverlay, type MRT_TableOptions, MRT_TablePagination, MRT_TablePaper, type MRT_TableState, type MRT_Theme, MRT_ToggleDensePaddingButton, MRT_ToggleFiltersButton, MRT_ToggleFullScreenButton, MRT_ToggleGlobalFilterButton, MRT_ToggleRowActionMenuButton, MRT_ToolbarAlertBanner, MRT_ToolbarDropZone, MRT_ToolbarInternalButtons, MRT_TopToolbar, MaterialReactTable, Memo_MRT_TableBody, Memo_MRT_TableBodyCell, Memo_MRT_TableBodyRow, type Prettify, type Xor, commonListItemStyles, commonMenuItemStyles, createMRTColumnHelper, createRow, extraIndexRangeExtractor, flexRender, getAllLeafColumnDefs, getCanRankRows, getColumnId, getCommonMRTCellStyles, getCommonToolbarStyles, getDefaultColumnFilterFn, getDefaultColumnOrderIds, getIsFirstColumn, getIsFirstRightPinnedColumn, getIsLastColumn, getIsLastLeftPinnedColumn, getLeadingDisplayColumnIds, getMRTTheme, getTotalRight, getTrailingDisplayColumnIds, getValueAndLabel, mrtFilterOptions, parseCSSVarId, parseFromValuesOrFunc, prepareColumns, rankGlobalFuzzy, reorderColumn, showExpandColumn, useMRT_ColumnVirtualizer, useMRT_DisplayColumns, useMRT_Effects, useMRT_RowVirtualizer, useMRT_Rows, useMRT_TableInstance, useMRT_TableOptions, useMaterialReactTable };
|