@mamrp/components 1.4.6 → 1.4.8
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/charts/index.d.mts +0 -0
- package/dist/charts/index.d.ts +0 -0
- package/dist/charts/index.js +0 -0
- package/dist/charts/index.js.map +1 -1
- package/dist/charts/index.mjs +0 -0
- package/dist/charts/index.mjs.map +1 -1
- package/dist/date-pickers/index.d.mts +0 -0
- package/dist/date-pickers/index.d.ts +0 -0
- package/dist/date-pickers/index.js +0 -0
- package/dist/date-pickers/index.js.map +0 -0
- package/dist/date-pickers/index.mjs +0 -0
- package/dist/date-pickers/index.mjs.map +0 -0
- package/dist/index.d.mts +8 -2
- package/dist/index.d.ts +8 -2
- package/dist/index.js +11 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +12 -3
- package/dist/index.mjs.map +1 -1
- package/dist/pagination/index.d.mts +0 -0
- package/dist/pagination/index.d.ts +0 -0
- package/dist/pagination/index.js +0 -0
- package/dist/pagination/index.js.map +0 -0
- package/dist/pagination/index.mjs +0 -0
- package/dist/pagination/index.mjs.map +0 -0
- package/dist/selectors/index.d.mts +0 -0
- package/dist/selectors/index.d.ts +0 -0
- package/dist/selectors/index.js +0 -0
- package/dist/selectors/index.js.map +1 -1
- package/dist/selectors/index.mjs +0 -0
- package/dist/selectors/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -4874,7 +4874,7 @@ import {
|
|
|
4874
4874
|
useMaterialReactTable
|
|
4875
4875
|
} from "material-react-table";
|
|
4876
4876
|
import { MRT_Localization_FA } from "material-react-table/locales/fa";
|
|
4877
|
-
import { useMemo } from "react";
|
|
4877
|
+
import { useMemo, useRef as useRef6 } from "react";
|
|
4878
4878
|
var customLocalization = {
|
|
4879
4879
|
...MRT_Localization_FA,
|
|
4880
4880
|
mrt_columns_showHide_resetOrder: "\u0628\u0627\u0632\u0646\u0634\u0627\u0646\u06CC \u062A\u0631\u062A\u06CC\u0628"
|
|
@@ -4912,13 +4912,17 @@ var DataTable = ({
|
|
|
4912
4912
|
renderTopToolbarCustomActions,
|
|
4913
4913
|
renderBottomToolbarCustomActions,
|
|
4914
4914
|
tableOptions = {},
|
|
4915
|
-
localization = customLocalization
|
|
4915
|
+
localization = customLocalization,
|
|
4916
|
+
enableColumnVirtualization = false,
|
|
4917
|
+
columnVirtualizerOptions = { overscan: 10 },
|
|
4918
|
+
enableColumnResizing = false
|
|
4916
4919
|
}) => {
|
|
4917
4920
|
const memoizedColumns = useMemo(() => columns, [columns]);
|
|
4918
4921
|
const memoizedData = useMemo(() => data, [data]);
|
|
4919
4922
|
const defaultRenderTopToolbarCustomActions = ({ table: table2 }) => {
|
|
4920
4923
|
const currentShowFilters = showColumnFilters !== void 0 ? showColumnFilters : table2.getState().showColumnFilters;
|
|
4921
|
-
if (!currentShowFilters || !showClearFiltersButton || !onClearFilters)
|
|
4924
|
+
if (!currentShowFilters || !showClearFiltersButton || !onClearFilters)
|
|
4925
|
+
return null;
|
|
4922
4926
|
return /* @__PURE__ */ React.createElement(Box23, { sx: { width: "100%" } }, /* @__PURE__ */ React.createElement(
|
|
4923
4927
|
Box23,
|
|
4924
4928
|
{
|
|
@@ -4937,10 +4941,15 @@ var DataTable = ({
|
|
|
4937
4941
|
)
|
|
4938
4942
|
));
|
|
4939
4943
|
};
|
|
4944
|
+
const columnVirtualizerInstanceRef = useRef6(null);
|
|
4940
4945
|
const table = useMaterialReactTable({
|
|
4941
4946
|
columns: memoizedColumns,
|
|
4942
4947
|
data: memoizedData,
|
|
4943
4948
|
localization,
|
|
4949
|
+
enableColumnResizing: false,
|
|
4950
|
+
enableColumnVirtualization,
|
|
4951
|
+
columnVirtualizerInstanceRef,
|
|
4952
|
+
columnVirtualizerOptions,
|
|
4944
4953
|
// === صفحهبندی ===
|
|
4945
4954
|
manualPagination,
|
|
4946
4955
|
onPaginationChange,
|