mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
NestedFolders: Make TagsCell return null when showing nothing (#67041)
This commit is contained in:
@@ -10,11 +10,11 @@ import { DashboardsTreeItem } from '../types';
|
||||
export function TagsCell({ row: { original: data } }: CellProps<DashboardsTreeItem, unknown>) {
|
||||
const styles = useStyles2(getStyles);
|
||||
const item = data.item;
|
||||
if (item.kind === 'ui-empty-folder') {
|
||||
return <></>;
|
||||
if (item.kind === 'ui-empty-folder' || !item.tags) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return <TagList className={styles.tagList} tags={item.tags ?? []} />;
|
||||
return <TagList className={styles.tagList} tags={item.tags} />;
|
||||
}
|
||||
|
||||
function getStyles(theme: GrafanaTheme2) {
|
||||
|
||||
Reference in New Issue
Block a user