Skip to content

Commit c854d39

Browse files
authored
fix: table control filter dropdowns now handle empty result sets (#1236)
1 parent d8f87b6 commit c854d39

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

projects/observability/src/shared/dashboard/widgets/table/table-widget-renderer.component.ts

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -203,11 +203,13 @@ export class TableWidgetRendererComponent
203203
protected fetchAndPopulateSelectControls(): void {
204204
this.selectControls$ = this.getSelectControls().pipe(
205205
tap((selectControls: TableSelectControl[]) => {
206-
selectControls.forEach(selectControl =>
207-
this.publishSelectValuesChange(
208-
selectControl.options[0].metaValue.field,
209-
selectControl.options.filter(o => o.applied)
210-
)
206+
selectControls.forEach(
207+
selectControl =>
208+
selectControl.options.length > 0 &&
209+
this.publishSelectValuesChange(
210+
selectControl.options[0].metaValue.field,
211+
selectControl.options.filter(o => o.applied)
212+
)
211213
);
212214
})
213215
);

0 commit comments

Comments
 (0)