diff --git a/src/components/FormSelectList.vue b/src/components/FormSelectList.vue index 6f22011..487df64 100644 --- a/src/components/FormSelectList.vue +++ b/src/components/FormSelectList.vue @@ -109,12 +109,6 @@ export default { countWithoutFilter: null, }; }, - mounted() { - this.$root.$on("selectListOptionsUpdated", this.onSelectListOptionsUpdated); - }, - beforeDestroy() { - this.$root.$off("selectListOptionsUpdated", this.onSelectListOptionsUpdated); - }, computed: { selectListOptionsWithSelected() { if (this.selectedOption && !this.selectListOptions.some(o => o.value === this.selectedOption.value)) { @@ -234,14 +228,6 @@ export default { } } }, - value: { - deep: true, - handler(newValue) { - if (newValue && typeof newValue === "object" && this.isMultiSelectDisabled()) { - this.updateOption(newValue); - } - } - } }, methods: { /** @@ -252,26 +238,6 @@ export default { isMultiSelectDisabled() { return this.options.allowMultiSelect === false; }, - - /** - * Updates the specified option with the provided updated value. - * - * @param {Object} updatedValue - The updated value of the option. - */ - updateOption(updatedValue) { - const index = this.selectListOptions.findIndex((option) => option.id === updatedValue.id); - if (index !== -1) { - this.$set(this.selectListOptions, index, updatedValue); - } - }, - /** - * If the value is an object, it updates the selected option if necessary. - */ - onSelectListOptionsUpdated() { - if (this.value && typeof this.value === "object" && this.isMultiSelectDisabled()) { - this.updateOption(this.value); - } - }, renderPmql(pmql) { if (typeof pmql !== "undefined" && pmql !== "" && pmql !== null) { const data = this.makeProxyData(); @@ -342,7 +308,6 @@ export default { const list = dataName ? get(response.data, dataName) : response.data; const transformedList = this.transformOptions(list); this.selectListOptions = transformedList; - this.$root.$emit("selectListOptionsUpdated", transformedList); return true; } catch (err) { /* Ignore error */