@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.mjs CHANGED
@@ -2974,6 +2974,7 @@ import React21, { useEffect as useEffect8 } from "react";
2974
2974
  var ScrollableContainer = styled2("div")({
2975
2975
  width: "100%",
2976
2976
  overflowX: "auto"
2977
+ // Enable horizontal scrolling
2977
2978
  });
2978
2979
  var Table = ({
2979
2980
  pagingmode,
@@ -3052,13 +3053,16 @@ var Table = ({
3052
3053
  pagination: {
3053
3054
  paginationModel: {
3054
3055
  pageSize: rowInPage ? rowInPage : 5,
3056
+ // Default page size (5)
3055
3057
  page: paginationModel?.page || 0
3058
+ // Default to page 0 if not provided
3056
3059
  }
3057
3060
  }
3058
3061
  }
3059
3062
  },
3060
3063
  ...shouldShowPagination && pagingmode == "client" && {
3061
3064
  paginationModel
3065
+ // Connect paginationModel to DataGrid
3062
3066
  }
3063
3067
  };
3064
3068
  return /* @__PURE__ */ React21.createElement(ScrollableContainer, null, /* @__PURE__ */ React21.createElement(
@@ -3076,23 +3080,20 @@ var Table = ({
3076
3080
  "& .MuiDataGrid-columnHeaderTitle": {
3077
3081
  fontSize: fontSize ?? "1rem"
3078
3082
  },
3083
+ "& .MuiDataGrid-row:nth-of-type(even)": {
3084
+ backgroundColor: evenRowBgColor !== "" ? evenRowBgColor : ""
3085
+ },
3086
+ "& .MuiDataGrid-row:hover": {
3087
+ backgroundColor: "rgba(0, 0, 0, 0.08)"
3088
+ },
3079
3089
  ...highlightedRowId && {
3080
3090
  "& .MuiDataGrid-row": {
3081
3091
  [`&[data-id="${highlightedRowId}"]`]: {
3082
3092
  backgroundColor: "#c5edd0"
3083
3093
  }
3084
3094
  }
3085
- },
3086
- "& .even-row": {
3087
- backgroundColor: evenRowBgColor
3088
- },
3089
- "& .MuiDataGrid-row:hover": {
3090
- backgroundColor: "rgba(0, 0, 0, 0.08)"
3091
3095
  }
3092
3096
  },
3093
- getRowClassName: (params) => {
3094
- return params.indexRelativeToCurrentPage % 2 === 0 ? "even-row" : "";
3095
- },
3096
3097
  ...option,
3097
3098
  ...shouldShowPagination && {
3098
3099
  onPaginationModelChange: setPaginationModel