diff --git a/client/src/pages/databases/collections/data/CollectionData.tsx b/client/src/pages/databases/collections/data/CollectionData.tsx index 8bb422aa..f9c70b59 100644 --- a/client/src/pages/databases/collections/data/CollectionData.tsx +++ b/client/src/pages/databases/collections/data/CollectionData.tsx @@ -177,6 +177,7 @@ const CollectionData = (props: CollectionDataProps) => { btnColor: 'secondary', label: btnTrans('importFile'), tooltip: btnTrans('importFileTooltip'), + disabled: () => selectedData?.length > 0, onClick: () => { setDialog({ open: true, @@ -219,6 +220,7 @@ const CollectionData = (props: CollectionDataProps) => { label: btnTrans('importSampleData'), icon: 'add', // tooltip: collectionTrans('deleteTooltip'), + disabled: () => selectedData?.length > 0, }, { icon: 'deleteOutline', @@ -245,9 +247,9 @@ const CollectionData = (props: CollectionDataProps) => { }, }); }, - disabled: () => total == 0, label: btnTrans('empty'), tooltip: btnTrans('emptyTooltip'), + disabled: () => selectedData?.length > 0 || total == 0, }, { type: 'button',