Skip to content

Instantly share code, notes, and snippets.

@neodigm
Created August 19, 2021 20:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save neodigm/c5954bf446e6156a3f71fcf711b0fc9b to your computer and use it in GitHub Desktop.
Save neodigm/c5954bf446e6156a3f71fcf711b0fc9b to your computer and use it in GitHub Desktop.
watch: {. //. Hydrate the Vuetify Pagination object to persist the Sort colunm and Number of Pages.
pagination(val) {
const lsKey = this?.$route?.path || 'lsKey'
localStorage.setItem(lsKey, JSON.stringify(val, null))
}
},
mounted() {
const lsKey = this?.$route?.path || 'lsKey'
if (localStorage.getItem(lsKey)) {
this.pagination = JSON.parse(localStorage.getItem(lsKey))
}
},
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment