material-react-table-narender 2.13.30 → 2.13.33

Sign up to get free protection for your applications and to get access to all the features.
package/dist/index.js CHANGED
@@ -3104,9 +3104,10 @@ const MRT_ColumnActionMenu = (_a) => {
3104
3104
  ]
3105
3105
  : []),
3106
3106
  // **Newly Added Menu Item for Toolbar Visibility**
3107
- jsxRuntime.jsx(MRT_ActionMenuItem, { icon: jsxRuntime.jsx(SettingsOutlinedIcon, {}), label: showToolBar ? "Hide ToolBar" : "Show ToolBar", onClick: (e) => {
3107
+ jsxRuntime.jsx(MRT_ActionMenuItem, { icon: jsxRuntime.jsx(SettingsOutlinedIcon, {}), label: showToolBar ? "Hide Toolbar" : "Show Toolbar", onClick: (e) => {
3108
3108
  e.stopPropagation();
3109
3109
  table.setShowToolBar(!showToolBar);
3110
+ setAnchorEl(null);
3110
3111
  }, table: table }, 13),
3111
3112
  ].filter(Boolean);
3112
3113
  return (jsxRuntime.jsx(Menu__default["default"], Object.assign({ MenuListProps: {
@@ -4274,10 +4275,7 @@ const MRT_ShowHideColumnsMenuItems = (_a) => {
4274
4275
  opacity: columnDefType !== 'display' ? 1 : 0.5,
4275
4276
  },
4276
4277
  },
4277
- }, control: jsxRuntime.jsx(Tooltip__default["default"], Object.assign({}, getCommonTooltipProps(), { title: localization.toggleVisibility, children: jsxRuntime.jsx(Switch__default["default"], {}) })), disabled: !column.getCanHide(), label: columnDef.header, onChange: () => handleToggleColumnHidden(column) })) : (jsxRuntime.jsx(Typography__default["default"], { sx: { alignSelf: 'center' }, children: columnDef.header })), enableColumnResizing && columnDefType !== 'group' &&
4278
- (columnDef.enableResizing !== false ? (jsxRuntime.jsx(Tooltip__default["default"], Object.assign({}, getCommonTooltipProps(), { title: localization.resetColumnSize, children: jsxRuntime.jsx(material.Button, { onClick: () => {
4279
- column.resetSize();
4280
- }, children: jsxRuntime.jsx(SettingsBackupRestoreIcon, {}) }) }))) : (jsxRuntime.jsx(Box__default["default"], { sx: { width: '28px' } })))] }) })), (_b = column.columns) === null || _b === void 0 ? void 0 : _b.map((c, i) => (jsxRuntime.jsx(MRT_ShowHideColumnsMenuItems, { allColumns: allColumns, column: c, hoveredColumn: hoveredColumn, isNestedColumns: isNestedColumns, setHoveredColumn: setHoveredColumn, table: table }, `${i}-${c.id}`)))] }));
4278
+ }, control: jsxRuntime.jsx(Tooltip__default["default"], Object.assign({}, getCommonTooltipProps(), { title: localization.toggleVisibility, children: jsxRuntime.jsx(Switch__default["default"], {}) })), disabled: !column.getCanHide(), label: columnDef.header, onChange: () => handleToggleColumnHidden(column) })) : (jsxRuntime.jsx(Typography__default["default"], { sx: { alignSelf: 'center' }, children: columnDef.header }))] }) })), (_b = column.columns) === null || _b === void 0 ? void 0 : _b.map((c, i) => (jsxRuntime.jsx(MRT_ShowHideColumnsMenuItems, { allColumns: allColumns, column: c, hoveredColumn: hoveredColumn, isNestedColumns: isNestedColumns, setHoveredColumn: setHoveredColumn, table: table }, `${i}-${c.id}`)))] }));
4281
4279
  };
4282
4280
 
4283
4281
  const MRT_ShowHideColumnsMenu = (_a) => {
@@ -4388,19 +4386,6 @@ const MRT_ToggleGlobalFilterButton = (_a) => {
4388
4386
  return (jsxRuntime.jsx(Tooltip__default["default"], { title: (_b = rest === null || rest === void 0 ? void 0 : rest.title) !== null && _b !== void 0 ? _b : localization.showHideSearch, children: jsxRuntime.jsx(IconButton__default["default"], Object.assign({ "aria-label": (_c = rest === null || rest === void 0 ? void 0 : rest.title) !== null && _c !== void 0 ? _c : localization.showHideSearch, disabled: !!globalFilter, onClick: handleToggleSearch }, rest, { title: undefined, children: showGlobalFilter ? jsxRuntime.jsx(SearchOffIcon, {}) : jsxRuntime.jsx(SearchIcon, {}) })) }));
4389
4387
  };
4390
4388
 
4391
- const MRT_ToggleNavigationButton = (_a) => {
4392
- var _b;
4393
- var { table } = _a, rest = __rest(_a, ["table"]);
4394
- const { getState, options: { icons: { FullscreenExitIcon, FullscreenIcon }, localization, }, setEnableKeyboardShortcuts, } = table;
4395
- const { enableKeyboardShortcuts } = getState();
4396
- const [tooltipOpened, setTooltipOpened] = react.useState(false);
4397
- const handleToggleFullScreen = () => {
4398
- setTooltipOpened(false);
4399
- setEnableKeyboardShortcuts(!enableKeyboardShortcuts);
4400
- };
4401
- return (jsxRuntime.jsx(Tooltip__default["default"], { open: tooltipOpened, title: (_b = rest === null || rest === void 0 ? void 0 : rest.title) !== null && _b !== void 0 ? _b : localization.toggleFullScreen, children: jsxRuntime.jsx(IconButton__default["default"], Object.assign({ "aria-label": localization.toggleFullScreen, onClick: handleToggleFullScreen, onMouseEnter: () => setTooltipOpened(true), onMouseLeave: () => setTooltipOpened(false) }, rest, { title: undefined, children: enableKeyboardShortcuts ? jsxRuntime.jsx(FullscreenExitIcon, {}) : jsxRuntime.jsx(FullscreenIcon, {}) })) }));
4402
- };
4403
-
4404
4389
  const MRT_ToolbarInternalButtons = (_a) => {
4405
4390
  var _b;
4406
4391
  var { table } = _a, rest = __rest(_a, ["table"]);
@@ -4411,7 +4396,7 @@ const MRT_ToolbarInternalButtons = (_a) => {
4411
4396
  enableGlobalFilter &&
4412
4397
  !(initialState === null || initialState === void 0 ? void 0 : initialState.showGlobalFilter) && (jsxRuntime.jsx(MRT_ToggleGlobalFilterButton, { table: table })), enableFilters &&
4413
4398
  enableColumnFilters &&
4414
- columnFilterDisplayMode !== 'popover' && (jsxRuntime.jsx(MRT_ToggleFiltersButton, { table: table })), (enableHiding || enableColumnOrdering || enableColumnPinning) && (jsxRuntime.jsx(MRT_ShowHideColumnsButton, { table: table })), enableDensityToggle && (jsxRuntime.jsx(MRT_ToggleDensePaddingButton, { table: table })), enableFullScreenToggle && (jsxRuntime.jsx(MRT_ToggleFullScreenButton, { table: table })), enableKeyboardShortcuts && (jsxRuntime.jsx(MRT_ToggleNavigationButton, { table: table }))] })) })));
4399
+ columnFilterDisplayMode !== 'popover' && (jsxRuntime.jsx(MRT_ToggleFiltersButton, { table: table })), (enableHiding || enableColumnOrdering || enableColumnPinning) && (jsxRuntime.jsx(MRT_ShowHideColumnsButton, { table: table })), enableDensityToggle && (jsxRuntime.jsx(MRT_ToggleDensePaddingButton, { table: table })), enableFullScreenToggle && (jsxRuntime.jsx(MRT_ToggleFullScreenButton, { table: table }))] })) })));
4415
4400
  };
4416
4401
 
4417
4402
  const MRT_GlobalFilterTextField = (_a) => {
@@ -4512,7 +4497,7 @@ const MRT_TablePaper = (_a) => {
4512
4497
  var _b, _c;
4513
4498
  var { table } = _a, rest = __rest(_a, ["table"]);
4514
4499
  const { getState, options: { enableBottomToolbar, enableTopToolbar, mrtTheme: { baseBackgroundColor }, muiTablePaperProps, renderBottomToolbar, renderTopToolbar, }, refs: { tablePaperRef }, } = table;
4515
- const { isFullScreen } = getState();
4500
+ const { isFullScreen, showToolBar } = getState();
4516
4501
  const paperProps = Object.assign(Object.assign({}, parseFromValuesOrFunc(muiTablePaperProps, { table })), rest);
4517
4502
  const theme = material.useTheme();
4518
4503
  return (jsxRuntime.jsxs(Paper__default["default"], Object.assign({ elevation: 2 }, paperProps, { ref: (ref) => {