Skip to content

Disable Data Table Sorter conditionally #3251

Answered by 07akioni
distor-sil3nt asked this question in Q&A
Discussion options

You must be logged in to vote

Should sort state be kept? If not I think you may create a computed rows which removes sorter prop conditionally.

computed(() => {
  return [{ key: 'key', title: 'Title', ...(editableRef.value ? {} : { sorter: 'default', sortOrder: sortOrderRef.value }) }]
})

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@07akioni
Comment options

@distor-sil3nt
Comment options

Answer selected by distor-sil3nt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants