Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(sheets): bugfix for freeze & hover-manager-service & data-validation #2233

Merged
merged 12 commits into from
May 15, 2024
Next Next commit
fix: #684 univer-pro
  • Loading branch information
weird94 committed May 11, 2024
commit 8d228f5e51dcb545ea8363e61e084d28026a3555
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