Skip to content

Exclude values (such as "") from Facet component #1137

Open
@tanza-s

Description

@tanza-s

Is your feature request related to a problem? Please describe.
I am building a facet component for a field that is blank for some records or otherwise has a field I don't want visible. I would like an option within the component that allows me to exclude certain values from the facet component.

Describe the solution you'd like
It'd be great to have this be an array that I can set within the React component itself. This is the pattern that we used in Searchkit.

<Facet
    field="get_major_filter"
    label="Major"
    filterType="any"
    isFilterable={true}
    **exclude={["", "Non-degree"]}**
/>

Describe alternatives you've considered
I can't think of a way to do this outside of building a custom facet component, which I really don't want to do. For now, allowing "" and "Non-degree" to display is good enough, but it looks pretty bad (the blank string is just a checkbox).

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions