@alaarab/ogrid-react-material 2.1.11 → 2.1.13

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/esm/index.js CHANGED
@@ -839,7 +839,7 @@ function DataGridTableInner(props) {
839
839
  rowHeight,
840
840
  rowNumberOffset,
841
841
  headerRows,
842
- allowOverflowX: _allowOverflowX,
842
+ allowOverflowX,
843
843
  fitToContent,
844
844
  editCallbacks,
845
845
  interactionHandlers,
@@ -853,7 +853,7 @@ function DataGridTableInner(props) {
853
853
  hasCheckboxCol,
854
854
  hasRowNumbersCol,
855
855
  colOffset,
856
- minTableWidth: _minTableWidth,
856
+ minTableWidth,
857
857
  columnSizingOverrides,
858
858
  measuredColumnWidths,
859
859
  selectedRowIds,
@@ -930,11 +930,11 @@ function DataGridTableInner(props) {
930
930
  minHeight: isLoading && items.length === 0 ? 200 : 0,
931
931
  width: fitToContent ? "fit-content" : "100%",
932
932
  maxWidth: "100%",
933
- overflowX: suppressHorizontalScroll ? "hidden" : "auto",
933
+ overflowX: suppressHorizontalScroll ? "hidden" : allowOverflowX ? "auto" : "hidden",
934
934
  overflowY: "auto",
935
935
  bgcolor: "background.paper",
936
936
  willChange: "scroll-position"
937
- }), [fitToContent, suppressHorizontalScroll, isLoading, items.length]);
937
+ }), [fitToContent, suppressHorizontalScroll, allowOverflowX, isLoading, items.length]);
938
938
  const cellDensityStyle = DENSITY_CELL_STYLES[density] ?? DENSITY_CELL_STYLES.normal;
939
939
  const renderCellContent = useCallback(
940
940
  (item, col, rowIndex, colIdx) => {
@@ -1006,17 +1006,17 @@ function DataGridTableInner(props) {
1006
1006
  onKeyDown: handleGridKeyDown,
1007
1007
  onContextMenu: PREVENT_DEFAULT,
1008
1008
  "data-density": density,
1009
- "data-suppress-scroll": o.suppressHorizontalScroll ? "true" : void 0,
1009
+ "data-overflow-x": allowOverflowX ? "true" : "false",
1010
1010
  className: "ogrid-mat-wrapper",
1011
1011
  sx: wrapperSx,
1012
1012
  children: [
1013
- /* @__PURE__ */ jsx(Box, { sx: WRAPPER_SCROLL_SX, children: /* @__PURE__ */ jsx("div", { style: { minWidth: "100%" }, children: /* @__PURE__ */ jsxs(Box, { ref: tableContainerRef, sx: isLoading && items.length > 0 ? TABLE_WRAPPER_LOADING_SX : TABLE_WRAPPER_SX, style: { width: "max-content", minWidth: "100%", overflow: "clip" }, children: [
1013
+ /* @__PURE__ */ jsx(Box, { sx: WRAPPER_SCROLL_SX, children: /* @__PURE__ */ jsx("div", { style: { minWidth: allowOverflowX ? minTableWidth : void 0, overflowX: "clip" }, children: /* @__PURE__ */ jsxs(Box, { ref: tableContainerRef, sx: isLoading && items.length > 0 ? TABLE_WRAPPER_LOADING_SX : TABLE_WRAPPER_SX, children: [
1014
1014
  /* @__PURE__ */ jsxs(
1015
1015
  Table,
1016
1016
  {
1017
1017
  size: "small",
1018
1018
  role: "grid",
1019
- sx: { minWidth: "max-content", width: "100%", borderCollapse: "separate", borderSpacing: 0 },
1019
+ sx: { minWidth: minTableWidth, borderCollapse: "separate", borderSpacing: 0 },
1020
1020
  children: [
1021
1021
  /* @__PURE__ */ jsx(TableHead, { sx: STICKY_HEADER_SX, children: headerRows.map((row, rowIdx) => /* @__PURE__ */ jsxs(TableRow, { sx: HEADER_ROW_SX, children: [
1022
1022
  rowIdx === headerRows.length - 1 && hasCheckboxCol && /* @__PURE__ */ jsx(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alaarab/ogrid-react-material",
3
- "version": "2.1.11",
3
+ "version": "2.1.13",
4
4
  "description": "OGrid React Material implementation – MUI Table–based data grid with sorting, filtering, pagination, column chooser, spreadsheet selection, and CSV export.",
5
5
  "main": "dist/esm/index.js",
6
6
  "module": "dist/esm/index.js",
@@ -39,7 +39,7 @@
39
39
  "node": ">=18"
40
40
  },
41
41
  "dependencies": {
42
- "@alaarab/ogrid-react": "2.1.11"
42
+ "@alaarab/ogrid-react": "2.1.13"
43
43
  },
44
44
  "peerDependencies": {
45
45
  "@emotion/react": "^11.0.0",