diff options
Diffstat (limited to 'webui/src/pages')
-rw-r--r-- | webui/src/pages/list/FilterToolbar.tsx | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/webui/src/pages/list/FilterToolbar.tsx b/webui/src/pages/list/FilterToolbar.tsx index 37f63b98..3046d9d8 100644 --- a/webui/src/pages/list/FilterToolbar.tsx +++ b/webui/src/pages/list/FilterToolbar.tsx @@ -65,7 +65,7 @@ function FilterToolbar({ query, queryLocation }: Props) { const classes = useStyles(); const params: Query = parse(query); const { data: identitiesData } = useListIdentitiesQuery(); - const { data: labelsData } = useListLabelsQuery() + const { data: labelsData } = useListLabelsQuery(); let identities: any = []; let labels: any = []; @@ -153,13 +153,15 @@ function FilterToolbar({ query, queryLocation }: Props) { > Author </FilterDropdown> - <FilterDropdown - dropdown={labels} - itemActive={(key) => hasValue('label', key)} - to={(key) => pipe(replaceParam('label', key), loc)(params)} - > - Label - </FilterDropdown> + {labels.length ? ( + <FilterDropdown + dropdown={labels} + itemActive={(key) => hasValue('label', key)} + to={(key) => pipe(replaceParam('label', key), loc)(params)} + > + Label + </FilterDropdown> + ) : null} <FilterDropdown dropdown={[ ['id', 'ID'], |