@mamrp/components 1.0.19 → 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 +9 -12
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +9 -12
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -2974,7 +2974,6 @@ 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
|
|
2978
2977
|
});
|
|
2979
2978
|
var Table = ({
|
|
2980
2979
|
pagingmode,
|
|
@@ -3053,16 +3052,13 @@ var Table = ({
|
|
|
3053
3052
|
pagination: {
|
|
3054
3053
|
paginationModel: {
|
|
3055
3054
|
pageSize: rowInPage ? rowInPage : 5,
|
|
3056
|
-
// Default page size (5)
|
|
3057
3055
|
page: paginationModel?.page || 0
|
|
3058
|
-
// Default to page 0 if not provided
|
|
3059
3056
|
}
|
|
3060
3057
|
}
|
|
3061
3058
|
}
|
|
3062
3059
|
},
|
|
3063
3060
|
...shouldShowPagination && pagingmode == "client" && {
|
|
3064
3061
|
paginationModel
|
|
3065
|
-
// Connect paginationModel to DataGrid
|
|
3066
3062
|
}
|
|
3067
3063
|
};
|
|
3068
3064
|
return /* @__PURE__ */ React21.createElement(ScrollableContainer, null, /* @__PURE__ */ React21.createElement(
|
|
@@ -3080,22 +3076,23 @@ var Table = ({
|
|
|
3080
3076
|
"& .MuiDataGrid-columnHeaderTitle": {
|
|
3081
3077
|
fontSize: fontSize ?? "1rem"
|
|
3082
3078
|
},
|
|
3083
|
-
...evenRowBgColor !== "" && {
|
|
3084
|
-
"& .MuiDataGrid-row:nth-child(even)": {
|
|
3085
|
-
backgroundColor: evenRowBgColor
|
|
3086
|
-
}
|
|
3087
|
-
},
|
|
3088
|
-
"& .MuiDataGrid-row:hover": {
|
|
3089
|
-
backgroundColor: "rgba(0, 0, 0, 0.08)"
|
|
3090
|
-
},
|
|
3091
3079
|
...highlightedRowId && {
|
|
3092
3080
|
"& .MuiDataGrid-row": {
|
|
3093
3081
|
[`&[data-id="${highlightedRowId}"]`]: {
|
|
3094
3082
|
backgroundColor: "#c5edd0"
|
|
3095
3083
|
}
|
|
3096
3084
|
}
|
|
3085
|
+
},
|
|
3086
|
+
"& .even-row": {
|
|
3087
|
+
backgroundColor: evenRowBgColor
|
|
3088
|
+
},
|
|
3089
|
+
"& .MuiDataGrid-row:hover": {
|
|
3090
|
+
backgroundColor: "rgba(0, 0, 0, 0.08)"
|
|
3097
3091
|
}
|
|
3098
3092
|
},
|
|
3093
|
+
getRowClassName: (params) => {
|
|
3094
|
+
return params.indexRelativeToCurrentPage % 2 === 0 ? "even-row" : "";
|
|
3095
|
+
},
|
|
3099
3096
|
...option,
|
|
3100
3097
|
...shouldShowPagination && {
|
|
3101
3098
|
onPaginationModelChange: setPaginationModel
|