Skip to content

Commit

Permalink
fix: #684 univer-pro
Browse files Browse the repository at this point in the history
  • Loading branch information
weird94 committed May 11, 2024
1 parent 184b98b commit 8d228f5
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions packages/sheets-data-validation/src/widgets/dropdown-widget.ts
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ export class DropdownWidget implements IBaseDataValidationWidget {
if (
tb === WrapStrategy.WRAP
) {
docModel.updateDocumentDataPageSize(realWidth);
docModel.updateDocumentDataPageSize(Math.max(realWidth, 1));
}

documentSkeleton.calculate();
Expand Down Expand Up @@ -293,7 +293,7 @@ export class DropdownWidget implements IBaseDataValidationWidget {
if (
tb === WrapStrategy.WRAP
) {
docModel.updateDocumentDataPageSize(realWidth);
docModel.updateDocumentDataPageSize(Math.max(realWidth, 1));
}

documentSkeleton.calculate();
Expand Down Expand Up @@ -327,7 +327,7 @@ export class DropdownWidget implements IBaseDataValidationWidget {
}

ctx.translate(MARGIN_H, paddingTop);
const rectWidth = cellWidth - MARGIN_H * 2;
const rectWidth = Math.max(cellWidth - MARGIN_H * 2, 1);
const rectHeight = fontHeight;
Rect.drawWith(ctx, {
width: rectWidth,
Expand Down Expand Up @@ -396,7 +396,7 @@ export class DropdownWidget implements IBaseDataValidationWidget {
if (
tb === WrapStrategy.WRAP
) {
docModel.updateDocumentDataPageSize(realWidth);
docModel.updateDocumentDataPageSize(Math.max(realWidth, 1));
}

documentSkeleton.calculate();
Expand All @@ -412,7 +412,7 @@ export class DropdownWidget implements IBaseDataValidationWidget {
if (
tb === WrapStrategy.WRAP
) {
docModel.updateDocumentDataPageSize(realWidth);
docModel.updateDocumentDataPageSize(Math.max(realWidth, 1));
}

documentSkeleton.calculate();
Expand Down

0 comments on commit 8d228f5

Please sign in to comment.