From d3c55064247eb5c2f02bd49053349a31850d3cea Mon Sep 17 00:00:00 2001 From: Dannon Baker Date: Mon, 23 Oct 2023 13:49:15 -0400 Subject: [PATCH] Drop all Vue.set usage for vue3 --- client/src/components/DataDialog/DataDialog.vue | 2 +- client/src/components/FilesDialog/FilesDialog.vue | 2 +- client/src/components/Form/FormDisplay.vue | 2 +- .../components/History/Content/GenericElement.vue | 2 +- .../History/CurrentHistory/HistoryPanel.vue | 2 +- .../src/components/RuleBuilder/ColumnSelector.vue | 5 ++--- client/src/components/ToolsList/ToolsListTable.vue | 8 ++++---- client/src/components/Upload/CompositeBox.vue | 2 +- client/src/components/Upload/DefaultBox.vue | 2 +- .../admin/Notifications/BroadcastForm.vue | 2 +- client/src/store/datasetExtFilesStore.js | 3 +-- client/src/store/historyStore/model/utilities.js | 6 ++---- client/src/store/invocationStore.js | 6 +++--- client/src/store/jobDestinationParametersStore.js | 2 +- client/src/stores/broadcastsStore.ts | 2 +- client/src/stores/datasetStore.ts | 8 ++++---- client/src/stores/history/historyItemsStore.js | 2 +- client/src/stores/historyStore.ts | 4 ++-- client/src/stores/jobMetricsStore.ts | 4 ++-- client/src/stores/jobStore.ts | 2 +- client/src/stores/toolStore.ts | 6 +++--- client/src/stores/workflowConnectionStore.ts | 2 +- client/src/stores/workflowEditorStateStore.ts | 14 ++++++-------- client/src/stores/workflowStepStore.ts | 10 +++++----- 24 files changed, 47 insertions(+), 53 deletions(-) diff --git a/client/src/components/DataDialog/DataDialog.vue b/client/src/components/DataDialog/DataDialog.vue index 8f4874b67df2..e295309b093d 100644 --- a/client/src/components/DataDialog/DataDialog.vue +++ b/client/src/components/DataDialog/DataDialog.vue @@ -123,7 +123,7 @@ export default { if (item.isLeaf) { _rowVariant = this.model.exists(item.id) ? "success" : "default"; } - Vue.set(item, "_rowVariant", _rowVariant); + item._rowVariant = _rowVariant; } }, /** Collects selected datasets in value array **/ diff --git a/client/src/components/FilesDialog/FilesDialog.vue b/client/src/components/FilesDialog/FilesDialog.vue index f96306b674ca..230606c521a8 100644 --- a/client/src/components/FilesDialog/FilesDialog.vue +++ b/client/src/components/FilesDialog/FilesDialog.vue @@ -182,7 +182,7 @@ function formatRows() { else if (!item.isLeaf) { _rowVariant = getIcon(isDirectorySelected(item.id), item.url); } - Vue.set(item, "_rowVariant", _rowVariant); + item._rowVariant = _rowVariant; } allSelected.value = checkIfAllSelected(); if (currentDirectory.value?.url) { diff --git a/client/src/components/Form/FormDisplay.vue b/client/src/components/Form/FormDisplay.vue index 6fe1e7128ac5..63d94fcb4045 100644 --- a/client/src/components/Form/FormDisplay.vue +++ b/client/src/components/Form/FormDisplay.vue @@ -175,7 +175,7 @@ export default { onCloneInputs() { this.formInputs = JSON.parse(JSON.stringify(this.inputs)); visitInputs(this.formInputs, (input) => { - Vue.set(input, "error", null); + input.error = null; }); this.onCreateIndex(); }, diff --git a/client/src/components/History/Content/GenericElement.vue b/client/src/components/History/Content/GenericElement.vue index 7205c0e19685..e44f7d08f9a5 100644 --- a/client/src/components/History/Content/GenericElement.vue +++ b/client/src/components/History/Content/GenericElement.vue @@ -17,7 +17,7 @@ const expandCollections = ref({}); const expandDatasets = ref({}); function toggle(expansionMap: Record, itemId: string) { - Vue.set(expansionMap, itemId, !expansionMap[itemId]); + expansionMap[itemId] = !expansionMap[itemId]; } diff --git a/client/src/components/History/CurrentHistory/HistoryPanel.vue b/client/src/components/History/CurrentHistory/HistoryPanel.vue index 7704b82e70a8..17b76bb2a57b 100644 --- a/client/src/components/History/CurrentHistory/HistoryPanel.vue +++ b/client/src/components/History/CurrentHistory/HistoryPanel.vue @@ -387,7 +387,7 @@ export default { rewatchHistory(); }, setInvisible(item) { - Vue.set(this.invisible, item.hid, true); + this.invisible[item.hid] = true; }, onTagChange(item, newTags) { item.tags = newTags; diff --git a/client/src/components/RuleBuilder/ColumnSelector.vue b/client/src/components/RuleBuilder/ColumnSelector.vue index 5acc6d14739c..0711dd8ada86 100644 --- a/client/src/components/RuleBuilder/ColumnSelector.vue +++ b/client/src/components/RuleBuilder/ColumnSelector.vue @@ -42,7 +42,6 @@