ods-component-lib 1.18.71 → 1.18.73

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.
@@ -16633,6 +16633,9 @@ var OdsRemoteDataGrid = function OdsRemoteDataGrid(props) {
16633
16633
  var _useState4 = useState(false),
16634
16634
  contentReady = _useState4[0],
16635
16635
  setContentReady = _useState4[1];
16636
+ var _useState5 = useState(0),
16637
+ scrollPosition = _useState5[0],
16638
+ setScrollPosition = _useState5[1];
16636
16639
  var onCancelEditEvent = new CustomEvent('cancelEdit', {
16637
16640
  bubbles: true,
16638
16641
  detail: {
@@ -17013,9 +17016,14 @@ var OdsRemoteDataGrid = function OdsRemoteDataGrid(props) {
17013
17016
  if (top < lastScrollTop) return;
17014
17017
  lastScrollTop = top <= 0 ? 0 : top;
17015
17018
  if (reachedBottom) onScrollEnd();
17019
+ setScrollPosition(top);
17016
17020
  }, 200);
17017
17021
  run(e);
17018
17022
  };
17023
+ useEffect(function () {
17024
+ var gridElement = gridRef.current.instance.element();
17025
+ gridElement.scrollTop = scrollPosition;
17026
+ }, [data.length]);
17019
17027
  useEffect(function () {
17020
17028
  document.querySelectorAll('.dx-scrollable-container').forEach(function (container) {
17021
17029
  container.addEventListener('scrollend', handleScroll);
@@ -17182,7 +17190,8 @@ var OdsRemoteDataGrid = function OdsRemoteDataGrid(props) {
17182
17190
  showScrollbar: "always",
17183
17191
  scrollByContent: true,
17184
17192
  scrollByThumb: true,
17185
- mode: "infinite"
17193
+ mode: "virtual",
17194
+ rowRenderingMode: "virtual"
17186
17195
  }), loading && React.createElement(LoadPanel, {
17187
17196
  enabled: true,
17188
17197
  shadingColor: "rgba(0,0,0,0.4)"