You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
so only by using this tableRef.value?.sort('taskTitle', false) resets sort - so it doesnt matter what columnKey i set, it must exist in table columns, so by setting any existing to false, it resets for all table. thus acting like tableRef.value?.clearSorter()
its very anoying to search how to hack this shit to work properly...
System is more complicated, its needs backend to fully be functional. becouse it is using @update:sorter to send requests which eventually updates data to table. which is being sorted out, from naive-ui -> backend -> naive ui - active sort indicates what is sorting state and what columnKey needs to be sorted. while sorted: true - it is "controlled" ish sorter.
deiiviidas
changed the title
DataTable Methods clearSorter bug
DataTable Methods clearSorter bug (uncontrolled sort)
May 1, 2024
deiiviidas
changed the title
DataTable Methods clearSorter bug (uncontrolled sort)
DataTable Methods clearSorter bug
May 1, 2024
Describe the bug
while datatable columns is like that and using tableRef.value?.clearSorter() wont clear active sort state from table th.
// minimal example //
DataTableColumns => {
return [
{
width: getWidth('title'),
title: 'Task title',
key: 'taskTitle',
sorter: true,
},
]
}
so only by using this tableRef.value?.sort('taskTitle', false) resets sort - so it doesnt matter what columnKey i set, it must exist in table columns, so by setting any existing to false, it resets for all table. thus acting like tableRef.value?.clearSorter()
its very anoying to search how to hack this shit to work properly...
Steps to reproduce
sorter: true,
and then set/use ref for table
Link to minimal reproduction
null
System Info
Used Package Manager
npm
Validations
The text was updated successfully, but these errors were encountered: