Skip to content

Commit

Permalink
fix: fix custom width problem #1905
Browse files Browse the repository at this point in the history
  • Loading branch information
Rui-Sun committed Jun 21, 2024
1 parent c4fb076 commit b927263
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"changes": [
{
"packageName": "@visactor/vtable",
"comment": "fix: fix custom width problem #1905",
"type": "none"
}
],
"packageName": "@visactor/vtable"
}
1 change: 1 addition & 0 deletions packages/vtable/src/scenegraph/layout/compute-col-width.ts
Original file line number Diff line number Diff line change
Expand Up @@ -481,6 +481,7 @@ function computeCustomRenderWidth(col: number, row: number, table: BaseTableAPI)
width = customRender?.expectedWidth ?? 0;
renderDefault = customRender?.renderDefault;
}
width = Math.ceil(width);
if (enableCellPadding) {
const actStyle = table._getCellStyle(col, row);
const padding = getQuadProps(getProp('padding', actStyle, col, row, table));
Expand Down

0 comments on commit b927263

Please sign in to comment.