@visns-studio/visns-components 3.3.11 → 3.3.12
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.
|
@@ -2146,13 +2146,18 @@ const DataGrid = forwardRef(
|
|
|
2146
2146
|
return Math.max(window.innerHeight * 0.7, 550);
|
|
2147
2147
|
};
|
|
2148
2148
|
|
|
2149
|
-
const calculateRows = (height) => Math.floor((height - 100) / 40);
|
|
2150
|
-
|
|
2151
2149
|
const minHeight = getMinimumHeight();
|
|
2152
2150
|
setGridStyle((prevState) => ({ ...prevState, minHeight }));
|
|
2153
2151
|
|
|
2154
|
-
|
|
2155
|
-
|
|
2152
|
+
if (ajaxSetting?.take > 50) {
|
|
2153
|
+
setLimit(ajaxSetting.take);
|
|
2154
|
+
} else {
|
|
2155
|
+
const calculateRows = (height) =>
|
|
2156
|
+
Math.floor((height - 100) / 40);
|
|
2157
|
+
|
|
2158
|
+
const rowCount = calculateRows(minHeight);
|
|
2159
|
+
setLimit(rowCount);
|
|
2160
|
+
}
|
|
2156
2161
|
}, [dataCount, gridHeight, window.innerHeight]);
|
|
2157
2162
|
|
|
2158
2163
|
useEffect(() => {
|
package/package.json
CHANGED