Loading client/src/components/History/Modals/SelectorModal.vue +12 −0 Original line number Diff line number Diff line Loading @@ -17,6 +17,7 @@ :selectable="true" :sort-by.sync="sortBy" :sort-desc.sync="sortDesc" :sort-compare="currentFirstSortCompare" select-mode="single" selected-variant="success" @row-selected="switchToHistory" Loading Loading @@ -96,6 +97,17 @@ export default { this.totalRows = filteredItems.length; this.currentPage = 1; }, /** Make the current history appear always first when sorting. */ currentFirstSortCompare(a, b, key, sortDesc) { if (a.id == this.currentHistoryId) { return sortDesc ? 1 : -1; } else if (b.id == this.currentHistoryId) { return sortDesc ? -1 : 1; } else { // Fallback to default sorting return false; } }, }, }; </script> Loading
client/src/components/History/Modals/SelectorModal.vue +12 −0 Original line number Diff line number Diff line Loading @@ -17,6 +17,7 @@ :selectable="true" :sort-by.sync="sortBy" :sort-desc.sync="sortDesc" :sort-compare="currentFirstSortCompare" select-mode="single" selected-variant="success" @row-selected="switchToHistory" Loading Loading @@ -96,6 +97,17 @@ export default { this.totalRows = filteredItems.length; this.currentPage = 1; }, /** Make the current history appear always first when sorting. */ currentFirstSortCompare(a, b, key, sortDesc) { if (a.id == this.currentHistoryId) { return sortDesc ? 1 : -1; } else if (b.id == this.currentHistoryId) { return sortDesc ? -1 : 1; } else { // Fallback to default sorting return false; } }, }, }; </script>