ods-component-lib 1.18.18 → 1.18.19
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.modern.js
CHANGED
|
@@ -17129,6 +17129,7 @@ var OdsRemoteDataGrid = function OdsRemoteDataGrid(props) {
|
|
|
17129
17129
|
var _useState4 = useState(props.columns),
|
|
17130
17130
|
columns = _useState4[0],
|
|
17131
17131
|
setColumns = _useState4[1];
|
|
17132
|
+
var gridRef = useRef(null);
|
|
17132
17133
|
var onCancelEditEvent = new CustomEvent('cancelEdit', {
|
|
17133
17134
|
bubbles: true,
|
|
17134
17135
|
detail: {
|
|
@@ -17144,7 +17145,7 @@ var OdsRemoteDataGrid = function OdsRemoteDataGrid(props) {
|
|
|
17144
17145
|
totalPageCount = 1;
|
|
17145
17146
|
loadedPageCount = 1;
|
|
17146
17147
|
totalRecordCount = 0;
|
|
17147
|
-
}, [props.
|
|
17148
|
+
}, [props.dataGridPageName]);
|
|
17148
17149
|
useEffect(function () {
|
|
17149
17150
|
var _props$axiosRequest;
|
|
17150
17151
|
if (props.axiosRequest !== undefined && Object.keys((_props$axiosRequest = props.axiosRequest) === null || _props$axiosRequest === void 0 ? void 0 : _props$axiosRequest.requestData).length > 0) {
|
|
@@ -17183,6 +17184,9 @@ var OdsRemoteDataGrid = function OdsRemoteDataGrid(props) {
|
|
|
17183
17184
|
useEffect(function () {
|
|
17184
17185
|
locale(localStorage.getItem("locale"));
|
|
17185
17186
|
loadMessages(JSON.parse(localStorage.getItem("localTranslation")));
|
|
17187
|
+
if (gridRef.current) {
|
|
17188
|
+
gridRef.current.instance.updateDimensions();
|
|
17189
|
+
}
|
|
17186
17190
|
}, []);
|
|
17187
17191
|
var actionButtons = useMemo(function () {
|
|
17188
17192
|
if (props.actionButtonGroup) {
|
|
@@ -17260,10 +17264,10 @@ var OdsRemoteDataGrid = function OdsRemoteDataGrid(props) {
|
|
|
17260
17264
|
if (e.row !== undefined && e.parentType === 'dataRow') {
|
|
17261
17265
|
if (props.isServerSide) {
|
|
17262
17266
|
var disableScrolling = function disableScrolling() {
|
|
17263
|
-
|
|
17267
|
+
gridRef.current.instance.option('scrolling.mode', 'none');
|
|
17264
17268
|
};
|
|
17265
17269
|
var enableScrolling = function enableScrolling() {
|
|
17266
|
-
|
|
17270
|
+
gridRef.current.instance.option('scrolling.mode', 'virtual');
|
|
17267
17271
|
};
|
|
17268
17272
|
e.editorOptions.onFocusIn = disableScrolling;
|
|
17269
17273
|
e.editorOptions.onFocusOut = enableScrolling;
|
|
@@ -17413,6 +17417,9 @@ var OdsRemoteDataGrid = function OdsRemoteDataGrid(props) {
|
|
|
17413
17417
|
var height = (_scrollable$clientHei = scrollable === null || scrollable === void 0 ? void 0 : scrollable.clientHeight) != null ? _scrollable$clientHei : 0;
|
|
17414
17418
|
var scrollHeight = (_scrollable$scrollHei = scrollable === null || scrollable === void 0 ? void 0 : scrollable.scrollHeight) != null ? _scrollable$scrollHei : 0;
|
|
17415
17419
|
var maxHeight = Math.max(top, height, scrollHeight) - 1;
|
|
17420
|
+
if (scrollHeight <= height) {
|
|
17421
|
+
return;
|
|
17422
|
+
}
|
|
17416
17423
|
var reachedBottom = Math.ceil(top + height) >= maxHeight;
|
|
17417
17424
|
var lastScrollTop = 0;
|
|
17418
17425
|
if (top < lastScrollTop) {
|
|
@@ -17442,7 +17449,7 @@ var OdsRemoteDataGrid = function OdsRemoteDataGrid(props) {
|
|
|
17442
17449
|
showBorders: true,
|
|
17443
17450
|
columnAutoWidth: false,
|
|
17444
17451
|
onEditorPreparing: onEditorPreparing,
|
|
17445
|
-
ref:
|
|
17452
|
+
ref: gridRef,
|
|
17446
17453
|
onExporting: onExporting,
|
|
17447
17454
|
height: props.height == undefined ? window.innerHeight - 164 : props.height,
|
|
17448
17455
|
allowColumnResizing: true,
|