Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save gdbate/6f80c5c6ff06133e8bd22e6a76c51a34 to your computer and use it in GitHub Desktop.

Select an option

Save gdbate/6f80c5c6ff06133e8bd22e6a76c51a34 to your computer and use it in GitHub Desktop.
Structuring Vuex Modules - Maintaining Record Order - Listing
{
computed: {
ordered(){
return Object.values(this.$store.state.albums.all).sort((a, b) => {return a.order - b.order})
},
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment