diff --git a/resources/assets/js/components/vuetable/extends/VtSortControl.vue b/resources/assets/js/components/vuetable/extends/VtSortControl.vue index 89a864af5..26b9631f9 100644 --- a/resources/assets/js/components/vuetable/extends/VtSortControl.vue +++ b/resources/assets/js/components/vuetable/extends/VtSortControl.vue @@ -1,7 +1,19 @@ diff --git a/resources/assets/js/home/CustomCaseList/CustomCaseList.vue b/resources/assets/js/home/CustomCaseList/CustomCaseList.vue index d58cd9a3b..3f645c94b 100644 --- a/resources/assets/js/home/CustomCaseList/CustomCaseList.vue +++ b/resources/assets/js/home/CustomCaseList/CustomCaseList.vue @@ -678,6 +678,7 @@ export default { id: that.data.customListId }); }); + Event.$on('clearSortEvent', this.clearSort); }, watch: { columns: function(val) { @@ -1238,6 +1239,21 @@ export default { return dataEllipsisMap[page]; } }, + /** + * Reset the sort in the table + */ + clearSort() { + if (this.$refs['vueTable']) { + this.$refs['vueTable'].setOrder(false) + this.$emit("updateSettings", { + data: [], + key: "orderBy", + page: that.data.pageParent, + type: "custom", + id: that.data.customListId + }); + } + } }; diff --git a/resources/assets/js/home/Paused/Paused.vue b/resources/assets/js/home/Paused/Paused.vue index 27fd6827f..beb8a15fb 100644 --- a/resources/assets/js/home/Paused/Paused.vue +++ b/resources/assets/js/home/Paused/Paused.vue @@ -386,6 +386,7 @@ export default { id: this.id }); }); + Event.$on('clearSortEvent', this.clearSort); }, watch: { columns: function (val) { @@ -772,6 +773,21 @@ export default { onPostNotes() { this.$refs["vueTable"].getData(); }, + /** + * Reset the sort in the table + */ + clearSort() { + if (this.$refs['vueTable']) { + this.$refs['vueTable'].setOrder(false); + this.$emit("updateSettings", { + data: [], + key: "orderBy", + page: "paused", + type: "normal", + id: this.id + }); + } + } }, }; diff --git a/resources/assets/js/home/Unassigned/Unassigned.vue b/resources/assets/js/home/Unassigned/Unassigned.vue index 581b3a07c..6d1a1c8e6 100644 --- a/resources/assets/js/home/Unassigned/Unassigned.vue +++ b/resources/assets/js/home/Unassigned/Unassigned.vue @@ -377,6 +377,7 @@ export default { id: this.id }); }); + Event.$on('clearSortEvent', this.clearSort); }, watch: { columns: function (val) { @@ -741,6 +742,21 @@ export default { onPostNotes() { this.$refs["vueTable"].getData(); }, + /** + * Reset the sort in the table + */ + clearSort() { + if (this.$refs['vueTable']) { + this.$refs['vueTable'].setOrder(false); + this.$emit("updateSettings", { + data: [], + key: "orderBy", + page: "unassigned", + type: "normal", + id: this.id + }); + } + } }, };