Skip to content

Commit

Permalink
fix(grid): should show icon in front of action button (#199)
Browse files Browse the repository at this point in the history
  • Loading branch information
minlovehua authored Dec 18, 2024
1 parent fe6ef2e commit e1c418e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
(click)="execute(menu)"
[thyDisabled]="disabled"
>
<thy-icon thyIconName="menu.icon"></thy-icon>
<thy-icon [thyIconName]="menu.icon!"></thy-icon>
<span>{{ menu.name }}</span>
</a>
}
Expand Down
5 changes: 3 additions & 2 deletions src/app/component/common/content/content.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ export class DemoTableContent {

aiFieldConfig: Signal<AIFieldConfig> = computed(() => {
const readonly = this.tableService.readonly();
const onlyOneField = this.tableService.fields().length === 1;
return {
fieldRenderers: {
[AITableFieldType.date]: {
Expand Down Expand Up @@ -94,14 +95,14 @@ export class DemoTableContent {
hidden: (aiTable: AITable, field: Signal<AITableField>) => false,
disabled: (aiTable: AITable, field: Signal<AITableField>) => false
},
{ ...DividerMenuItem, hidden: () => readonly },
{ ...DividerMenuItem, hidden: () => readonly || onlyOneField },
{
...buildRemoveFieldItem(() => {
const member = 'member_03';
const time = new Date().getTime();
return { updated_at: time, updated_by: member };
}),
hidden: () => readonly
hidden: () => readonly || onlyOneField
}
]
};
Expand Down

0 comments on commit e1c418e

Please sign in to comment.