Skip to content

Commit

Permalink
only show delete button for plugin products
Browse files Browse the repository at this point in the history
  • Loading branch information
kecnry committed May 19, 2022
1 parent ec6166f commit 3fb74c3
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion jdaviz/components/viewer_data_select_item.vue
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,10 @@ module.exports = {
return this.$props.viewer.selected_data_items.includes(this.$props.item.id)
},
isDeletable() {
if (this.$props.viewer.config === 'mosviz' && this.$props.item.meta.Plugin === undefined) {
// only allow deleting products from plugins. We might want to allow some non-plugin
// data to also be deleted in the future, but would probably need more advanced logic
// to ensure essential data isn't removed that would break the app.
if (this.$props.item.meta.Plugin === undefined) {
return false
}
// for any exceptions not above, enable deleting
Expand Down

0 comments on commit 3fb74c3

Please sign in to comment.