Skip to content

Commit

Permalink
refactor(table-toolbar): address PR comments
Browse files Browse the repository at this point in the history
address PR comments

✅ Closes: COMUI-3148
  • Loading branch information
gavin-everett-genesys committed Oct 8, 2024
1 parent 0216652 commit eb335e0
Showing 1 changed file with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -119,31 +119,30 @@ export class GuxTableToolbar {
}
}

get contextualActions(): HTMLGuxTableToolbarCustomActionElement[] | null {
get contextualActions(): HTMLGuxTableToolbarCustomActionElement[] {
if (this.contextualSlot?.hasChildNodes) {
return Array.from(
this.contextualSlot?.querySelectorAll(
'gux-table-toolbar-action, gux-table-toolbar-custom-action'
)
);
}
return [];
}

get filterActions(): HTMLGuxTableToolbarCustomActionElement[] | null {
get filterActions(): HTMLGuxTableToolbarCustomActionElement[] {
if (this.filterSlot?.hasChildNodes) {
return Array.from(
this.filterSlot?.querySelectorAll(
'gux-table-toolbar-action, gux-table-toolbar-custom-action'
)
);
}
return [];
}

get allFilterContextual(): HTMLGuxTableToolbarCustomActionElement[] {
return [
...(this.filterActions || []),
...(this.contextualActions || [])
].filter(action => action != null);
return this.filterActions?.concat(this.contextualActions);
}

private needsContextDivider(): boolean {
Expand Down

0 comments on commit eb335e0

Please sign in to comment.