mirror of https://github.com/apache/superset.git
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
|
||||
* 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 {
|
||||
createFetchRelated,
|
||||
|
@ -40,7 +40,6 @@ import { Link } from 'react-router-dom';
|
|||
import { deleteTags } from 'src/features/tags/tags';
|
||||
import { Tag as AntdTag } from 'antd';
|
||||
import { Tag } from 'src/views/CRUD/types';
|
||||
import TagCard from 'src/features/tags/TagCard';
|
||||
import TagModal from 'src/features/tags/TagModal';
|
||||
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'] = [];
|
||||
|
||||
if (canDelete) {
|
||||
|
@ -400,7 +369,6 @@ function TagList(props: TagListProps) {
|
|||
? userKey.thumbnails
|
||||
: isFeatureEnabled(FeatureFlag.THUMBNAILS)
|
||||
}
|
||||
renderCard={renderCard}
|
||||
defaultViewMode={
|
||||
isFeatureEnabled(FeatureFlag.LISTVIEWS_DEFAULT_CARD_VIEW)
|
||||
? 'card'
|
||||
|
|
Loading…
Reference in New Issue