FilterChip

A filter as one pill, “Status is 2xx”: property, operator and value, each opening a menu.

View source
Status
import { FilterChip } from "@logicplanes/kaeso-ui";

Props

  • defaultValuesOpen
    boolean

    Open the value menu when the chip appears: a filter just added asks for its value at once.

  • multiple
    boolean

    Several values may be chosen.

  • onOperatorChange
    ((operator: string) => void)

    Called with the chosen comparison.

  • onRemove
    (() => void)

    Called when the filter is removed.

  • onSelectedChange
    ((selected: string[]) => void)

    Called with the chosen values.

  • operator
    string

    "is", "is not", "is any of"

  • operators
    string[]

    The comparisons people can choose, such as “is” and “is not”.

  • property
    ReactNode

    "Status"

  • propertyIcon
    IconSvgElement

    The icon of the property the filter applies to.

  • selected
    string[] = []

    The chosen values.

  • value
    ReactNode

    The value, as shown: "2xx", or "2 models".

  • values
    FilterChipChoice[]

    Choices for the value menu.