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

[bug]: filter not working #637

Open
Hassanabdelqader opened this issue Oct 22, 2024 · 10 comments
Open

[bug]: filter not working #637

Hassanabdelqader opened this issue Oct 22, 2024 · 10 comments

Comments

@Hassanabdelqader
Copy link

Describe the bug

filter not working when you are in page 2 or 3 or any page instead of 1

How to reproduce

run the project
go to page 2 or page 3 or any page
then select status and choose any of the option
the page return back to page 1 but the data is not filtered based on status

Link to reproduction

https://github.com/sadmann7/shadcn-table

Additional information

No response

@Hassanabdelqader
Copy link
Author

Follow up

@sadmann7
Copy link
Owner

should be fixed now

@Hassanabdelqader
Copy link
Author

@sadmann7 no still not fixed

@noxify
Copy link
Contributor

noxify commented Oct 23, 2024

Hi @Hassanabdelqader ,

tested it quickly and it seems to work:

Bildschirmaufnahme.2024-10-23.um.23.13.28.mov

And here the recording with the advanced filter:

Bildschirmaufnahme.2024-10-23.um.23.15.17.mov

@sadmann7 - it seems that the status count inside the filter is not counting correctly.
We have 13 records with the status Todo, but the count ( inside the badge ) shows 10.

@Hassanabdelqader
Copy link
Author

Hi please try this scenario
Choose status more than one
Then go to page 2 or 3
Then click reset

@Hassanabdelqader
Copy link
Author

Also try this scenario
Click update and make an error the sheet update close it should stay open and only close when update successed

@sadmann7
Copy link
Owner

Hi @Hassanabdelqader ,

tested it quickly and it seems to work:

Bildschirmaufnahme.2024-10-23.um.23.13.28.mov
And here the recording with the advanced filter:

Bildschirmaufnahme.2024-10-23.um.23.15.17.mov
@sadmann7 - it seems that the status count inside the filter is not counting correctly. We have 13 records with the status Todo, but the count ( inside the badge ) shows 10.

was a caching issue, should be fixed now

@sadmann7 sadmann7 reopened this Oct 24, 2024
@Hassanabdelqader
Copy link
Author

Can you just tell me what exactly have you changed since i applied the table with another project and i need just the changed

@sadmann7
Copy link
Owner

Describe the bug

filter not working when you are in page 2 or 3 or any page instead of 1

How to reproduce

run the project go to page 2 or page 3 or any page then select status and choose any of the option the page return back to page 1 but the data is not filtered based on status

Link to reproduction

https://github.com/sadmann7/shadcn-table

Additional information

No response

as soon as you will choose a filter on a different page, it will send you to page 1

thats the best practice for server side filtering imo

data is always being filtered unless you click reset, as @noxify showed

@sadmann7
Copy link
Owner

Can you just tell me what exactly have you changed since i applied the table with another project and i need just the changed

try using this hook

use-data-table

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants