Skip to content

Commit

Permalink
fix(grid): fix the style and color error of the selected option #WIK-…
Browse files Browse the repository at this point in the history
…16677
  • Loading branch information
Maple13 authored and pubuzhixing8 committed Oct 15, 2024
1 parent 3e637c7 commit 83bd54d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/grid/src/renderer/drawers/cell-drawer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ export class CellDrawer extends Drawer {
height: bgConfig.height,
color: Colors.white,
padding: AI_TABLE_CELL_PADDING,
background: item?.color ?? Colors.primary
background: item?.bg_color ?? item?.color ?? Colors.primary
});
} else {
this.rect(bgConfig);
Expand Down Expand Up @@ -399,7 +399,7 @@ export class CellDrawer extends Drawer {
ctx.globalAlpha = 1;
const colors = AITable.getColors();
const optionStyle = (field as AITableSelectField).settings.option_style;
let background = item?.color ?? colors.primary;
let background = item?.bg_color ?? item?.color ?? colors.primary;
const dotMaxTextWidth = columnWidth - 2 * AI_TABLE_CELL_PADDING - AI_TABLE_PIECE_WIDTH - AI_TABLE_TEXT_GAP;
const borderWidth = 1;
switch (optionStyle) {
Expand Down

0 comments on commit 83bd54d

Please sign in to comment.