Skip to content

Boolean filter is shown as check box #276

Open
@ManiMozaffar

Description

@ManiMozaffar

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions