Skip to content

Commit 2574d6f

Browse files
committed
enhance datatable feature to save sort property
1 parent e21a469 commit 2574d6f

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

resources/js/ui/Table/Table.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -573,13 +573,13 @@
573573
574574
saveSortProperty() {
575575
if (this.saveSortBy) {
576-
window.localStorage.setItem('ui-table-sort-' + this.id + '-' + window.location.pathname, JSON.stringify(this.sort))
576+
window.localStorage.setItem('ui-table-sort-' + this.id + '-' + this.endpoint + '-' + window.location.pathname, JSON.stringify(this.sort))
577577
}
578578
},
579579
580580
loadSortProperty() {
581581
try {
582-
let sort = window.localStorage.getItem('ui-table-sort-' + this.id + '-' + window.location.pathname)
582+
let sort = window.localStorage.getItem('ui-table-sort-' + this.id + '-' + this.endpoint + '-' + window.location.pathname)
583583
if (sort) {
584584
sort = JSON.parse(sort)
585585
this.sort = sort

0 commit comments

Comments
 (0)