@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.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,22 +3103,23 @@ var Table = ({
|
|
|
3107
3103
|
"& .MuiDataGrid-columnHeaderTitle": {
|
|
3108
3104
|
fontSize: fontSize ?? "1rem"
|
|
3109
3105
|
},
|
|
3110
|
-
...evenRowBgColor !== "" && {
|
|
3111
|
-
"& .MuiDataGrid-row:nth-child(even)": {
|
|
3112
|
-
backgroundColor: evenRowBgColor
|
|
3113
|
-
}
|
|
3114
|
-
},
|
|
3115
|
-
"& .MuiDataGrid-row:hover": {
|
|
3116
|
-
backgroundColor: "rgba(0, 0, 0, 0.08)"
|
|
3117
|
-
},
|
|
3118
3106
|
...highlightedRowId && {
|
|
3119
3107
|
"& .MuiDataGrid-row": {
|
|
3120
3108
|
[`&[data-id="${highlightedRowId}"]`]: {
|
|
3121
3109
|
backgroundColor: "#c5edd0"
|
|
3122
3110
|
}
|
|
3123
3111
|
}
|
|
3112
|
+
},
|
|
3113
|
+
"& .even-row": {
|
|
3114
|
+
backgroundColor: evenRowBgColor
|
|
3115
|
+
},
|
|
3116
|
+
"& .MuiDataGrid-row:hover": {
|
|
3117
|
+
backgroundColor: "rgba(0, 0, 0, 0.08)"
|
|
3124
3118
|
}
|
|
3125
3119
|
},
|
|
3120
|
+
getRowClassName: (params) => {
|
|
3121
|
+
return params.indexRelativeToCurrentPage % 2 === 0 ? "even-row" : "";
|
|
3122
|
+
},
|
|
3126
3123
|
...option,
|
|
3127
3124
|
...shouldShowPagination && {
|
|
3128
3125
|
onPaginationModelChange: setPaginationModel
|