Skip to content

fix: checkbox filter disappearing fix #36

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

alexhey1999
Copy link

This is a potential resolution to the issue of the checkbox component disappearing entirely when the user filters down to the point where no results are returned. I'm not sure if this will have any knock-on effects across the repo.

How to replicate:

  1. Go to https://data-table.openstatus.dev/infinite.
  2. Select Regions in the filter list
  3. Type '1' or any other text that does not have any matches

Fix:

Will no longer return null for the whole component. This way, the options disappear as intended, allowing the user to alter the text input to see more results.

Issue

issue.mp4

Fixed Version

fix.mp4

Copy link

vercel bot commented May 4, 2025

@alexhey1999 is attempting to deploy a commit to the OpenStatus Team on Vercel.

A member of the Team first needs to authorize it.

Copy link

vercel bot commented May 28, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
data-table-filters ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 28, 2025 9:32am

Copy link
Member

@mxkaske mxkaske left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @alexhey1999! Sorry for the late response. Good catch on that one. Left a small comment.

@@ -73,7 +71,7 @@ export function DataTableFilterCheckbox<TData>({
) : null}
{/* FIXME: due to the added max-h and overflow-y-auto, the hover state and border is laying on top of the scroll bar */}
<div className="max-h-[200px] overflow-y-auto rounded-lg border border-border empty:border-none">
{filterOptions
{filterOptions!
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of forcing it with !, can we use optional chaining (?) instead?

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.

2 participants