Skip to content

Commit

Permalink
Merge pull request #594 from zilliztech/attu-583
Browse files Browse the repository at this point in the history
update: hide import file/insert sample data/empty data actions button if there is a selection
  • Loading branch information
shanghaikid authored Jul 22, 2024
2 parents 04cf1e5 + d284058 commit 04865a0
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@ const CollectionData = (props: CollectionDataProps) => {
btnColor: 'secondary',
label: btnTrans('importFile'),
tooltip: btnTrans('importFileTooltip'),
disabled: () => selectedData?.length > 0,
onClick: () => {
setDialog({
open: true,
Expand Down Expand Up @@ -219,6 +220,7 @@ const CollectionData = (props: CollectionDataProps) => {
label: btnTrans('importSampleData'),
icon: 'add',
// tooltip: collectionTrans('deleteTooltip'),
disabled: () => selectedData?.length > 0,
},
{
icon: 'deleteOutline',
Expand All @@ -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',
Expand Down

0 comments on commit 04865a0

Please sign in to comment.