-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DataTable Methods clearSorter bug #5909
Comments
Provide the repetition of [minimum recurring example] (https://stackoverflow.com/help/minimal-reproducible-example) |
NO. 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. |
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: