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

Fix: Filters not always being reset. #13

Merged
merged 1 commit into from
Jan 1, 2024
Merged

Conversation

dewodt
Copy link
Contributor

@dewodt dewodt commented Dec 18, 2023

Issue #7 .

From what I understand, the code doesn't clear all the filter because the code tries to loop a router.push() which I don't think it's working and thus from what I observe, it only deletes the last filter search params.

What I did is instead of loop router.push(), first I collect all of the params, second then remove all the null params, then finally create a createQueryString based on the net params then push to the new URL. I also left a comment on my changes that describes this.

I'm really sorry I can't create an exact deployment example of this repo because this repo uses Planet Scale with Drizzle ORM. Last time I used Planet Scale I can create new projects without credit cards, but now it forces me use credit card. So I can't create a Planet Scale project.

But I have created a project implementing SSR table without the search input filter, but a plus with a Date Range Picker. My project link https://astro.dewodt.com or github https://github.com/dewodt/guess-astro (I use Neon Posgres for this project). Particularly, the feature is implemented in the /history page. But it requires sign in, so I'm just going to show you a recording of it. Here's the video demo:

shadcn-table-demo.mp4

Please review my code. Thank you.
@sadmann7 @kavinvalli

Copy link

vercel bot commented Dec 18, 2023

@dewodt is attempting to deploy a commit to the SmartRoof Team on Vercel.

A member of the Team first needs to authorize it.

@sadmann7
Copy link
Owner

sadmann7 commented Jan 1, 2024

thanks

@sadmann7 sadmann7 merged commit 638a718 into sadmann7:main Jan 1, 2024
3 of 5 checks passed
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

Successfully merging this pull request may close these issues.

None yet

2 participants