@handsontable/react-wrapper 0.0.0-next-accbc16-20260828 → 0.0.0-next-e7ff0da-20260901

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.
@@ -532,12 +532,26 @@ function useUpdateEffect(effect, deps) {
532
532
  }
533
533
 
534
534
  /**
535
- * Only `dataSchema` and `columns` use deep comparison when diffing props for `updateSettings(false)`.
536
- * Other object settings (for example `mergeCells`, `cell`, `nestedHeaders`, hooks) stay on strict
535
+ * Only these settings use deep comparison when diffing props for `updateSettings(false)`. Other
536
+ * object settings (for example `mergeCells`, `cell`, `nestedHeaders`, hooks) stay on strict
537
537
  * reference equality so we avoid expensive deep walks and accidental false positives where functions
538
538
  * or class instances would not compare meaningfully by keys alone.
539
+ *
540
+ * `rowHeights`, `minRowHeights` (its documented alias) and `colWidths` are here because passing any
541
+ * of them re-declares the sizes and discards the ones the user produced by dragging
542
+ * (`ManualRowResize` / `ManualColumnResize`). A re-render must not do that, and a React app commonly
543
+ * writes the value inline (`rowHeights={[50, 50]}`), which is a new array on every render and never
544
+ * reference-equal. All three hold plain numbers, strings or arrays of them, so the deep walk is
545
+ * cheap. The Vue wrapper already skips unchanged keys this way.
546
+ */
547
+ var DEEP_COMPARABLE_SETTINGS = ['dataSchema', 'columns', 'rowHeights', 'minRowHeights', 'colWidths'];
548
+
549
+ /**
550
+ * The size settings are compared against the grid's live settings rather than the previous props,
551
+ * which is what the Angular and Vue wrappers already do. Comparing against props alone would stop
552
+ * re-asserting the prop after anything changed the size through the instance ref.
539
553
  */
540
- var DEEP_COMPARABLE_SETTINGS = ['dataSchema', 'columns'];
554
+ var COMPARED_AGAINST_LIVE_SETTINGS = ['rowHeights', 'minRowHeights', 'colWidths'];
541
555
  var SettingsMapper = /*#__PURE__*/function () {
542
556
  function SettingsMapper() {
543
557
  _classCallCheck(this, SettingsMapper);
@@ -561,14 +575,23 @@ var SettingsMapper = /*#__PURE__*/function () {
561
575
  _ref$isInit = _ref.isInit,
562
576
  isInit = _ref$isInit === void 0 ? false : _ref$isInit,
563
577
  _ref$initOnlySettingK = _ref.initOnlySettingKeys,
564
- initOnlySettingKeys = _ref$initOnlySettingK === void 0 ? [] : _ref$initOnlySettingK;
578
+ initOnlySettingKeys = _ref$initOnlySettingK === void 0 ? [] : _ref$initOnlySettingK,
579
+ currentSettings = _ref.currentSettings;
565
580
  var shouldSkipProp = function shouldSkipProp(key) {
566
- if (!isInit && DEEP_COMPARABLE_SETTINGS.includes(key)) {
567
- return areEquivalentSettingsValue(prevProps[key], properties[key]);
581
+ if (isInit) {
582
+ return false;
568
583
  }
569
- if (!isInit && initOnlySettingKeys.includes(key)) {
584
+
585
+ // Checked before the value comparison below. The two lists do not overlap today, but a
586
+ // changed deep-comparable key used to return early and skip this guard entirely, which would
587
+ // have forwarded an init-only key to `updateSettings` as soon as one joined both lists.
588
+ if (initOnlySettingKeys.includes(key)) {
570
589
  return true;
571
590
  }
591
+ if (DEEP_COMPARABLE_SETTINGS.includes(key)) {
592
+ var comparedValue = currentSettings && COMPARED_AGAINST_LIVE_SETTINGS.includes(key) ? currentSettings[key] : prevProps[key];
593
+ return areEquivalentSettingsValue(comparedValue, properties[key]);
594
+ }
572
595
  return false;
573
596
  };
574
597
  var newSettings = {};
@@ -1200,7 +1223,7 @@ var HotColumn = function HotColumn(props) {
1200
1223
  }, editorPortal);
1201
1224
  };
1202
1225
 
1203
- var version="0.0.0-next-accbc16-20260828";
1226
+ var version="0.0.0-next-e7ff0da-20260901";
1204
1227
 
1205
1228
  /**
1206
1229
  * Component used to manage the renderer component portals.
@@ -2415,13 +2438,13 @@ var HotTableInner = /*#__PURE__*/React.forwardRef(function (props, ref) {
2415
2438
  var _getHotInstance;
2416
2439
  var init = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
2417
2440
  var prevProps = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
2418
- var initOnlySettingKeys = !isHotInstanceDestroyed() ?
2419
- // Needed for React's double-rendering.
2420
- ((_getHotInstance = getHotInstance()) === null || _getHotInstance === void 0 || (_getHotInstance = _getHotInstance.getSettings()) === null || _getHotInstance === void 0 ? void 0 : _getHotInstance._initOnlySettings) || [] : [];
2441
+ var liveSettings = !isHotInstanceDestroyed() ? (_getHotInstance = getHotInstance()) === null || _getHotInstance === void 0 ? void 0 : _getHotInstance.getSettings() : undefined;
2442
+ var initOnlySettingKeys = (liveSettings === null || liveSettings === void 0 ? void 0 : liveSettings._initOnlySettings) || [];
2421
2443
  var newSettings = SettingsMapper.getSettings(props, {
2422
2444
  prevProps: prevProps,
2423
2445
  isInit: init,
2424
- initOnlySettingKeys: initOnlySettingKeys
2446
+ initOnlySettingKeys: initOnlySettingKeys,
2447
+ currentSettings: liveSettings
2425
2448
  });
2426
2449
  if (context.columnsSettings.length) {
2427
2450
  newSettings.columns = context.columnsSettings;
@@ -25,7 +25,7 @@
25
25
  * INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER ARISING FROM
26
26
  * USE OR INABILITY TO USE THIS SOFTWARE.
27
27
  *
28
- * Version: 0.0.0-next-accbc16-20260828 (built at Fri Aug 28 2026 10:55:47 GMT+0000 (Coordinated Universal Time))
28
+ * Version: 0.0.0-next-e7ff0da-20260901 (built at Tue Sep 01 2026 10:46:12 GMT+0000 (Coordinated Universal Time))
29
29
  */
30
30
  (function (global, factory) {
31
31
  typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('react'), require('react-dom'), require('handsontable/base'), require('handsontable/renderers/registry'), require('handsontable/editors/registry')) :
@@ -557,12 +557,26 @@ function useUpdateEffect(effect, deps) {
557
557
  }
558
558
 
559
559
  /**
560
- * Only `dataSchema` and `columns` use deep comparison when diffing props for `updateSettings(false)`.
561
- * Other object settings (for example `mergeCells`, `cell`, `nestedHeaders`, hooks) stay on strict
560
+ * Only these settings use deep comparison when diffing props for `updateSettings(false)`. Other
561
+ * object settings (for example `mergeCells`, `cell`, `nestedHeaders`, hooks) stay on strict
562
562
  * reference equality so we avoid expensive deep walks and accidental false positives where functions
563
563
  * or class instances would not compare meaningfully by keys alone.
564
+ *
565
+ * `rowHeights`, `minRowHeights` (its documented alias) and `colWidths` are here because passing any
566
+ * of them re-declares the sizes and discards the ones the user produced by dragging
567
+ * (`ManualRowResize` / `ManualColumnResize`). A re-render must not do that, and a React app commonly
568
+ * writes the value inline (`rowHeights={[50, 50]}`), which is a new array on every render and never
569
+ * reference-equal. All three hold plain numbers, strings or arrays of them, so the deep walk is
570
+ * cheap. The Vue wrapper already skips unchanged keys this way.
571
+ */
572
+ var DEEP_COMPARABLE_SETTINGS = ['dataSchema', 'columns', 'rowHeights', 'minRowHeights', 'colWidths'];
573
+
574
+ /**
575
+ * The size settings are compared against the grid's live settings rather than the previous props,
576
+ * which is what the Angular and Vue wrappers already do. Comparing against props alone would stop
577
+ * re-asserting the prop after anything changed the size through the instance ref.
564
578
  */
565
- var DEEP_COMPARABLE_SETTINGS = ['dataSchema', 'columns'];
579
+ var COMPARED_AGAINST_LIVE_SETTINGS = ['rowHeights', 'minRowHeights', 'colWidths'];
566
580
  var SettingsMapper = /*#__PURE__*/function () {
567
581
  function SettingsMapper() {
568
582
  _classCallCheck(this, SettingsMapper);
@@ -586,14 +600,23 @@ var SettingsMapper = /*#__PURE__*/function () {
586
600
  _ref$isInit = _ref.isInit,
587
601
  isInit = _ref$isInit === void 0 ? false : _ref$isInit,
588
602
  _ref$initOnlySettingK = _ref.initOnlySettingKeys,
589
- initOnlySettingKeys = _ref$initOnlySettingK === void 0 ? [] : _ref$initOnlySettingK;
603
+ initOnlySettingKeys = _ref$initOnlySettingK === void 0 ? [] : _ref$initOnlySettingK,
604
+ currentSettings = _ref.currentSettings;
590
605
  var shouldSkipProp = function shouldSkipProp(key) {
591
- if (!isInit && DEEP_COMPARABLE_SETTINGS.includes(key)) {
592
- return areEquivalentSettingsValue(prevProps[key], properties[key]);
606
+ if (isInit) {
607
+ return false;
593
608
  }
594
- if (!isInit && initOnlySettingKeys.includes(key)) {
609
+
610
+ // Checked before the value comparison below. The two lists do not overlap today, but a
611
+ // changed deep-comparable key used to return early and skip this guard entirely, which would
612
+ // have forwarded an init-only key to `updateSettings` as soon as one joined both lists.
613
+ if (initOnlySettingKeys.includes(key)) {
595
614
  return true;
596
615
  }
616
+ if (DEEP_COMPARABLE_SETTINGS.includes(key)) {
617
+ var comparedValue = currentSettings && COMPARED_AGAINST_LIVE_SETTINGS.includes(key) ? currentSettings[key] : prevProps[key];
618
+ return areEquivalentSettingsValue(comparedValue, properties[key]);
619
+ }
597
620
  return false;
598
621
  };
599
622
  var newSettings = {};
@@ -1225,7 +1248,7 @@ var HotColumn = function HotColumn(props) {
1225
1248
  }, editorPortal);
1226
1249
  };
1227
1250
 
1228
- var version="0.0.0-next-accbc16-20260828";
1251
+ var version="0.0.0-next-e7ff0da-20260901";
1229
1252
 
1230
1253
  /**
1231
1254
  * Component used to manage the renderer component portals.
@@ -1413,13 +1436,13 @@ var HotTableInner = /*#__PURE__*/React.forwardRef(function (props, ref) {
1413
1436
  var _getHotInstance;
1414
1437
  var init = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
1415
1438
  var prevProps = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
1416
- var initOnlySettingKeys = !isHotInstanceDestroyed() ?
1417
- // Needed for React's double-rendering.
1418
- ((_getHotInstance = getHotInstance()) === null || _getHotInstance === void 0 || (_getHotInstance = _getHotInstance.getSettings()) === null || _getHotInstance === void 0 ? void 0 : _getHotInstance._initOnlySettings) || [] : [];
1439
+ var liveSettings = !isHotInstanceDestroyed() ? (_getHotInstance = getHotInstance()) === null || _getHotInstance === void 0 ? void 0 : _getHotInstance.getSettings() : undefined;
1440
+ var initOnlySettingKeys = (liveSettings === null || liveSettings === void 0 ? void 0 : liveSettings._initOnlySettings) || [];
1419
1441
  var newSettings = SettingsMapper.getSettings(props, {
1420
1442
  prevProps: prevProps,
1421
1443
  isInit: init,
1422
- initOnlySettingKeys: initOnlySettingKeys
1444
+ initOnlySettingKeys: initOnlySettingKeys,
1445
+ currentSettings: liveSettings
1423
1446
  });
1424
1447
  if (context.columnsSettings.length) {
1425
1448
  newSettings.columns = context.columnsSettings;