Skip to content

Commit

Permalink
change tag deletion updated based on feedback
Browse files Browse the repository at this point in the history
Signed-off-by: sharpd <davidsharp7@gmail.com>
  • Loading branch information
davidsharp7 committed Apr 16, 2024
1 parent 5d5c449 commit ef2de7b
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions web/src/components/datasets/DatasetTags.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -116,13 +116,9 @@ const DatasetTags: React.FC<IProps> = (props) => {
}

const handleDelete = (deletedTag: string) => {
const index = selectedTags.indexOf(deletedTag)

if (index !== -1) {
const newSelectedTags = [...selectedTags]
newSelectedTags.splice(index, 1)
setSelectedTags(newSelectedTags)
}
const newSelectedTags = selectedTags.filter((tag) => deletedTag !== tag)

setSelectedTags(newSelectedTags)

datasetField
? deleteDatasetFieldTag(namespace, datasetName, deletedTag, datasetField)
Expand Down

0 comments on commit ef2de7b

Please sign in to comment.