@mamrp/components 1.0.18 → 1.0.20

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