Skip to content
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

docs: DataTable sorting section write about disableClientSideSorting prop #4166

Closed
m0ksem opened this issue Mar 1, 2024 · 2 comments
Closed
Labels
d1: super easy Task for newbies. Players take half normal damage from monsters and the environment. docs packages/docs good first issue Right issue if you're new to vuestic v2: nice to have This will make Vuestic feel better

Comments

@m0ksem
Copy link
Contributor

m0ksem commented Mar 1, 2024

Q:

When re-using the code from the data-table sorting section (https://ui.vuestic.dev/ui-elements/data-table#sorting) the columns are not sorting when I click on the column names. It works on the documentation example but doesn't work in my project.

A:

Try to set disableClientSideSorting to true.

We mimic server-side sorting in VuesticAdmin and globally disabled client-side sorting in
vuestic-admin/src/services/vuestic-ui/global-config.ts

In case you're going to use client-side sorting in you project, you can remove this prop or set it to false.

To prevent user confusion.

Simply add something like "Data table uses client-side sorting by default, to prevent re-ordering two times (after cleint sorting and after server sorting) you can use disableClientSideSorting." - this is awful explanation from me! Make it better :)

@m0ksem m0ksem added docs packages/docs good first issue Right issue if you're new to vuestic d1: super easy Task for newbies. Players take half normal damage from monsters and the environment. v2: nice to have This will make Vuestic feel better labels Mar 1, 2024
@khurram-ansari
Copy link
Contributor

@m0ksem is this explanation good?

"By default, the data table utilizes client-side sorting. However, when using server-side sorting use the disableClientSideSorting prop to prevent dual re-ordering."

@m0ksem
Copy link
Contributor Author

m0ksem commented Mar 10, 2024

@m0ksem is this explanation good?

"By default, the data table utilizes client-side sorting. However, when using server-side sorting use the disableClientSideSorting prop to prevent dual re-ordering."

Yeah. I think it is so much better.

khurram-ansari added a commit to khurram-ansari/vuestic-ui that referenced this issue Mar 11, 2024
@m0ksem m0ksem closed this as completed in 5dcd72c Mar 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
d1: super easy Task for newbies. Players take half normal damage from monsters and the environment. docs packages/docs good first issue Right issue if you're new to vuestic v2: nice to have This will make Vuestic feel better
Projects
None yet
Development

No branches or pull requests

2 participants