@fileverse-dev/fortune-core 1.1.97 → 1.1.99

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.
@@ -1,5 +1,5 @@
1
1
  import { colLocationByIndex, diff, getcellrange, getCellValue, getFlowdata, getRangeByTxt, getSheetIndex, isAllowEdit, isAllowEditReadOnly, iscelldata, isdatetime, isRealNull, isRealNum, jfrefreshgrid, mergeBorder, rowLocationByIndex, setCellValue } from "..";
2
- import { setRowHeight } from "../api";
2
+ import { getRowHeight, setRowHeight } from "../api";
3
3
  export function dataRangeSelection(ctx, cache, rangT, type, value) {
4
4
  var _a, _b;
5
5
  ctx.rangeDialog.show = true;
@@ -630,7 +630,11 @@ export function setDropdownValue(ctx, value, arr) {
630
630
  v: value,
631
631
  pillColor: selectedColor
632
632
  });
633
- setRowHeight(ctx, (_a = {}, _a[String(rowIndex)] = 22 * (value.split(",").length || (valueData === null || valueData === void 0 ? void 0 : valueData.length)) || 22, _a));
633
+ var currentRowHeight = getRowHeight(ctx, [rowIndex])[rowIndex];
634
+ var newHeight = 22 * (value.split(",").length || (valueData === null || valueData === void 0 ? void 0 : valueData.length)) || 22;
635
+ if (currentRowHeight < newHeight) {
636
+ setRowHeight(ctx, (_a = {}, _a[String(rowIndex)] = newHeight, _a));
637
+ }
634
638
  jfrefreshgrid(ctx, null, undefined);
635
639
  }
636
640
  export function confirmMessage(ctx, generalDialog, dataVerification) {
@@ -645,7 +645,11 @@ function setDropdownValue(ctx, value, arr) {
645
645
  v: value,
646
646
  pillColor: selectedColor
647
647
  });
648
- (0, _api.setRowHeight)(ctx, (_a = {}, _a[String(rowIndex)] = 22 * (value.split(",").length || (valueData === null || valueData === void 0 ? void 0 : valueData.length)) || 22, _a));
648
+ var currentRowHeight = (0, _api.getRowHeight)(ctx, [rowIndex])[rowIndex];
649
+ var newHeight = 22 * (value.split(",").length || (valueData === null || valueData === void 0 ? void 0 : valueData.length)) || 22;
650
+ if (currentRowHeight < newHeight) {
651
+ (0, _api.setRowHeight)(ctx, (_a = {}, _a[String(rowIndex)] = newHeight, _a));
652
+ }
649
653
  (0, _.jfrefreshgrid)(ctx, null, undefined);
650
654
  }
651
655
  function confirmMessage(ctx, generalDialog, dataVerification) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fileverse-dev/fortune-core",
3
- "version": "1.1.97",
3
+ "version": "1.1.99",
4
4
  "main": "lib/index.js",
5
5
  "module": "es/index.js",
6
6
  "typings": "lib/index.d.ts",