mirror of
https://github.com/apache/superset.git
synced 2024-09-12 08:39:45 -04:00
feat: removing renderCard from Tags/index.tsc to remove cardview from Tags ListView (#25105)
This commit is contained in:
parent
067bfbf950
commit
66e2807009
@ -16,7 +16,7 @@
|
|||||||
* specific language governing permissions and limitations
|
* specific language governing permissions and limitations
|
||||||
* under the License.
|
* under the License.
|
||||||
*/
|
*/
|
||||||
import React, { useMemo, useCallback, useState } from 'react';
|
import React, { useMemo, useState } from 'react';
|
||||||
import { isFeatureEnabled, FeatureFlag, t } from '@superset-ui/core';
|
import { isFeatureEnabled, FeatureFlag, t } from '@superset-ui/core';
|
||||||
import {
|
import {
|
||||||
createFetchRelated,
|
createFetchRelated,
|
||||||
@ -40,7 +40,6 @@ import { Link } from 'react-router-dom';
|
|||||||
import { deleteTags } from 'src/features/tags/tags';
|
import { deleteTags } from 'src/features/tags/tags';
|
||||||
import { Tag as AntdTag } from 'antd';
|
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 TagModal from 'src/features/tags/TagModal';
|
import TagModal from 'src/features/tags/TagModal';
|
||||||
import FaveStar from 'src/components/FaveStar';
|
import FaveStar from 'src/components/FaveStar';
|
||||||
|
|
||||||
@ -297,36 +296,6 @@ function TagList(props: TagListProps) {
|
|||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
const renderCard = useCallback(
|
|
||||||
(tag: Tag) => (
|
|
||||||
<TagCard
|
|
||||||
tag={tag}
|
|
||||||
hasPerm={hasPerm}
|
|
||||||
bulkSelectEnabled={bulkSelectEnabled}
|
|
||||||
refreshData={refreshData}
|
|
||||||
showThumbnails={
|
|
||||||
userKey
|
|
||||||
? userKey.thumbnails
|
|
||||||
: isFeatureEnabled(FeatureFlag.THUMBNAILS)
|
|
||||||
}
|
|
||||||
userId={userId}
|
|
||||||
loading={loading}
|
|
||||||
addDangerToast={addDangerToast}
|
|
||||||
addSuccessToast={addSuccessToast}
|
|
||||||
/>
|
|
||||||
),
|
|
||||||
[
|
|
||||||
addDangerToast,
|
|
||||||
addSuccessToast,
|
|
||||||
bulkSelectEnabled,
|
|
||||||
hasPerm,
|
|
||||||
loading,
|
|
||||||
userId,
|
|
||||||
refreshData,
|
|
||||||
userKey,
|
|
||||||
],
|
|
||||||
);
|
|
||||||
|
|
||||||
const subMenuButtons: SubMenuProps['buttons'] = [];
|
const subMenuButtons: SubMenuProps['buttons'] = [];
|
||||||
|
|
||||||
if (canDelete) {
|
if (canDelete) {
|
||||||
@ -400,7 +369,6 @@ function TagList(props: TagListProps) {
|
|||||||
? userKey.thumbnails
|
? userKey.thumbnails
|
||||||
: isFeatureEnabled(FeatureFlag.THUMBNAILS)
|
: isFeatureEnabled(FeatureFlag.THUMBNAILS)
|
||||||
}
|
}
|
||||||
renderCard={renderCard}
|
|
||||||
defaultViewMode={
|
defaultViewMode={
|
||||||
isFeatureEnabled(FeatureFlag.LISTVIEWS_DEFAULT_CARD_VIEW)
|
isFeatureEnabled(FeatureFlag.LISTVIEWS_DEFAULT_CARD_VIEW)
|
||||||
? 'card'
|
? 'card'
|
||||||
|
Loading…
Reference in New Issue
Block a user