@mamrp/components 1.0.20 → 1.0.21

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/index.js CHANGED
@@ -3001,6 +3001,7 @@ var import_react19 = __toESM(require("react"));
3001
3001
  var ScrollableContainer = (0, import_styles.styled)("div")({
3002
3002
  width: "100%",
3003
3003
  overflowX: "auto"
3004
+ // Enable horizontal scrolling
3004
3005
  });
3005
3006
  var Table = ({
3006
3007
  pagingmode,
@@ -3079,13 +3080,16 @@ var Table = ({
3079
3080
  pagination: {
3080
3081
  paginationModel: {
3081
3082
  pageSize: rowInPage ? rowInPage : 5,
3083
+ // Default page size (5)
3082
3084
  page: paginationModel?.page || 0
3085
+ // Default to page 0 if not provided
3083
3086
  }
3084
3087
  }
3085
3088
  }
3086
3089
  },
3087
3090
  ...shouldShowPagination && pagingmode == "client" && {
3088
3091
  paginationModel
3092
+ // Connect paginationModel to DataGrid
3089
3093
  }
3090
3094
  };
3091
3095
  return /* @__PURE__ */ import_react19.default.createElement(ScrollableContainer, null, /* @__PURE__ */ import_react19.default.createElement(
@@ -3103,23 +3107,20 @@ var Table = ({
3103
3107
  "& .MuiDataGrid-columnHeaderTitle": {
3104
3108
  fontSize: fontSize ?? "1rem"
3105
3109
  },
3110
+ "& .MuiDataGrid-row:nth-of-type(even)": {
3111
+ backgroundColor: evenRowBgColor !== "" ? evenRowBgColor : ""
3112
+ },
3113
+ "& .MuiDataGrid-row:hover": {
3114
+ backgroundColor: "rgba(0, 0, 0, 0.08)"
3115
+ },
3106
3116
  ...highlightedRowId && {
3107
3117
  "& .MuiDataGrid-row": {
3108
3118
  [`&[data-id="${highlightedRowId}"]`]: {
3109
3119
  backgroundColor: "#c5edd0"
3110
3120
  }
3111
3121
  }
3112
- },
3113
- "& .even-row": {
3114
- backgroundColor: evenRowBgColor
3115
- },
3116
- "& .MuiDataGrid-row:hover": {
3117
- backgroundColor: "rgba(0, 0, 0, 0.08)"
3118
3122
  }
3119
3123
  },
3120
- getRowClassName: (params) => {
3121
- return params.indexRelativeToCurrentPage % 2 === 0 ? "even-row" : "";
3122
- },
3123
3124
  ...option,
3124
3125
  ...shouldShowPagination && {
3125
3126
  onPaginationModelChange: setPaginationModel