Skip to content

Commit

Permalink
Merge pull request #428 from ProcessMaker/bugfix/FOUR-17063
Browse files Browse the repository at this point in the history
Fix E2E Test Failures in SelectList Test Suites
  • Loading branch information
ryancooley authored Jul 8, 2024
2 parents 65e000e + 4460dc4 commit f190142
Showing 1 changed file with 0 additions and 35 deletions.
35 changes: 0 additions & 35 deletions src/components/FormSelectList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down Expand Up @@ -234,14 +228,6 @@ export default {
}
}
},
value: {
deep: true,
handler(newValue) {
if (newValue && typeof newValue === "object" && this.isMultiSelectDisabled()) {
this.updateOption(newValue);
}
}
}
},
methods: {
/**
Expand All @@ -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();
Expand Down Expand Up @@ -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 */
Expand Down

0 comments on commit f190142

Please sign in to comment.