diff --git a/packages/grafana-ui/src/components/Table/FilterList.tsx b/packages/grafana-ui/src/components/Table/FilterList.tsx index e4ca6d19df8..308b4d7f575 100644 --- a/packages/grafana-ui/src/components/Table/FilterList.tsx +++ b/packages/grafana-ui/src/components/Table/FilterList.tsx @@ -184,41 +184,42 @@ export const FilterList = ({ )} - {!items.length && } - {items.length && ( - - {({ index, style }) => { - const option = items[index]; - const { value, label } = option; - const isChecked = values.find((s) => s.value === value) !== undefined; + {items.length > 0 ? ( + <> + + {({ index, style }) => { + const option = items[index]; + const { value, label } = option; + const isChecked = values.find((s) => s.value === value) !== undefined; - return ( -
- -
- ); - }} -
- )} - {items.length && ( - -
-
- -
- + return ( +
+ +
+ ); + }} + + +
+
+ +
+ + + ) : ( + )} ); @@ -246,4 +247,7 @@ const getStyles = (theme: GrafanaTheme2) => ({ borderTop: `1px solid ${theme.colors.border.medium}`, padding: theme.spacing(0.5, 2), }), + noValuesLabel: css({ + paddingTop: theme.spacing(1), + }), });