Disable Data Table Sorter conditionally #3251
-
Hello naive-Community, is there any way to conditionally disable the sorting function of the Data Table component? I have an editable data table with input fields. I would like to disable the sorter and remove the default sorting icons in all columns when I am in edit mode, i. e. I tried to no avail to achieve this with the provided Thanks in advance for your help and effort. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
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 }) }]
}) |
Beta Was this translation helpful? Give feedback.
Should sort state be kept? If not I think you may create a computed rows which removes sorter prop conditionally.