PMCORE-3456:Advanced Search Clear Order does not dissapear after being clicked PMCORE_3.7.0-5487

This commit is contained in:
Fabio Guachalla
2021-10-25 17:03:50 -04:00
parent 1d0e21e71f
commit fd25a4ae78

View File

@@ -100,6 +100,7 @@ import api from "../../api/index";
import utils from "../../utils/utils";
import defaultMixin from "./defaultMixins.js";
import customMixin from "./customMixins";
import { Event } from "vue-tables-2";
export default {
name: "AdvancedSearch",
@@ -183,7 +184,6 @@ export default {
selectAllMode: "page",
programmatic: false,
},
sortable: [],
sortable: ["case_number"],
requestFunction(data) {
return this.$parent.$parent.getCasesForVueTable(data);
@@ -202,6 +202,9 @@ export default {
}
};
},
mounted() {
Event.$on('clearSortEvent', this.clearSort);
},
watch: {
id: function() {
this.$refs.vueTable.refresh();
@@ -594,6 +597,14 @@ export default {
onPostNotes() {
this.$refs["vueTable"].getData();
},
/**
* Reset the sort in the table
*/
clearSort() {
if (this.$refs['vueTable']) {
this.$refs['vueTable'].setOrder(false);
}
},
},
};
</script>