mirror of https://github.com/apache/superset.git
feat: add empty state for Tags (#24702)
This commit is contained in:
parent
4b1f1d49d6
commit
e5d626c304
|
@ -43,6 +43,21 @@ import { Tag as AntdTag } from 'antd';
|
||||||
import { Tag } from 'src/views/CRUD/types';
|
import { Tag } from 'src/views/CRUD/types';
|
||||||
import TagCard from 'src/features/tags/TagCard';
|
import TagCard from 'src/features/tags/TagCard';
|
||||||
|
|
||||||
|
const emptyState = {
|
||||||
|
title: t('No Tags created'),
|
||||||
|
image: 'dashboard.svg',
|
||||||
|
description:
|
||||||
|
'Create a new tag and assign it to existing entities like charts or dashboards',
|
||||||
|
buttonAction: () => {},
|
||||||
|
// todo(hughhh): Add this back once Tag modal is functional
|
||||||
|
// buttonText: (
|
||||||
|
// <>
|
||||||
|
// <i className="fa fa-plus" data-test="add-rule-empty" />{' '}
|
||||||
|
// {'Create a new Tag'}{' '}
|
||||||
|
// </>
|
||||||
|
// ),
|
||||||
|
};
|
||||||
|
|
||||||
const PAGE_SIZE = 25;
|
const PAGE_SIZE = 25;
|
||||||
|
|
||||||
interface TagListProps {
|
interface TagListProps {
|
||||||
|
@ -303,6 +318,7 @@ function TagList(props: TagListProps) {
|
||||||
count={tagCount}
|
count={tagCount}
|
||||||
data={tags.filter(tag => !tag.name.includes(':'))}
|
data={tags.filter(tag => !tag.name.includes(':'))}
|
||||||
disableBulkSelect={toggleBulkSelect}
|
disableBulkSelect={toggleBulkSelect}
|
||||||
|
emptyState={emptyState}
|
||||||
fetchData={fetchData}
|
fetchData={fetchData}
|
||||||
filters={filters}
|
filters={filters}
|
||||||
initialSort={initialSort}
|
initialSort={initialSort}
|
||||||
|
|
Loading…
Reference in New Issue