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

Boolean filter is shown as check box #276

Open
ManiMozaffar opened this issue Apr 19, 2024 · 2 comments
Open

Boolean filter is shown as check box #276

ManiMozaffar opened this issue Apr 19, 2024 · 2 comments
Labels
enhancement New feature or request
Milestone

Comments

@ManiMozaffar
Copy link
Contributor

This is code:

class SomeFilter(BaseModel): 
    is_foo: bool | None = Field(default=None, json_schema_extra={"placeholder": "Filter by Foo..."})

What I actually want is this:
Screenshot 2024-04-19 at 11 01 40

but it render as this:
Screenshot 2024-04-19 at 11 03 06

Workaround is to use Literal["true","false"] on filter, and then switch it to boolean on table view. But I'm questioning if bool should be always checkbox or not? i'd leave that to user tbh. sometimes it doesn't make sense.
Another bug would be that the json schema extra doesn't even show up.
and the last bug is that It also doesn't submit search/filter form when clicking on it, which is another bug in its state.

@sydney-runkle sydney-runkle added this to the v2.6.0 milestone Apr 19, 2024
@sydney-runkle
Copy link
Member

sydney-runkle commented Apr 19, 2024

Adding this to the v0.6.0 milestone - not sure we'll implement this change, but definitely something we'll consider!

@sydney-runkle sydney-runkle added the enhancement New feature or request label May 2, 2024
@sydney-runkle
Copy link
Member

Just circling back - I think we'd want to add support for both!

@sydney-runkle sydney-runkle modified the milestones: v0.6.0, v0.7.0 May 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants