Manta Developers
GitHub
Menu

@manta-eu/react/filter-bar

Reference for @manta-eu/react/filter-bar as it is on main.

Type Aliases

ClearFiltersProps

ClearFiltersProps = object

Properties

label?

optional label?: string

onClick

onClick: () => void

Returns

void


FilterBarProps

FilterBarProps = object

Properties

children?

optional children?: ReactNode

className?

optional className?: string

optional search?: ReactNode


FilterBarSearchProps

FilterBarSearchProps = object

Properties

label

label: string

maxLength?

optional maxLength?: number

onValueChange

onValueChange: (value) => void

Parameters
value

string

Returns

void

placeholder?

optional placeholder?: string

value

value: string


FilterDropdownProps

FilterDropdownProps<T> = object

Type Parameters

T

T

Properties

fullWidth?

optional fullWidth?: boolean

label

label: string

name?

optional name?: string

Shown while the first option is picked (“Status”); otherwise the pick shows.

onChange

onChange: (value) => void

Parameters
value

T

Returns

void

options

options: readonly FilterOption<T>[]

value

value: T


FilterFoldProps

FilterFoldProps = object

Properties

at

at: FilterFoldWidth

Container width from which wide shows.

folded?

optional folded?: ReactNode

wide

wide: ReactNode


FilterFoldWidth

FilterFoldWidth = "48rem" | "63rem"


FilterOption

FilterOption<T> = object

Type Parameters

T

T

Properties

count?

optional count?: number

id

id: T

label

label: string


ListFiltersProps

ListFiltersProps = object

Properties

activeCount

activeCount: number

children

children: ReactNode

label?

optional label?: string

mobileSort?

optional mobileSort?: ReactNode

onReset

onReset: () => void

Returns

void

resetLabel?

optional resetLabel?: string


MoreFiltersProps

MoreFiltersProps = object

Properties

activeCount

activeCount: number

children

children: ReactNode

label?

optional label?: string


TableSortChoice

TableSortChoice = object

Properties

onChange

onChange: (value) => void

Parameters
value

string

Returns

void

options

options: FilterOption<string>[]

value

value: string


TableSortWords

TableSortWords = object

Properties

columnLabels?

optional columnLabels?: Record<string, string>

defaultOrderLabel?

optional defaultOrderLabel?: string

sortLabel?

optional sortLabel?: (column, desc) => string

One sort option’s words; “Name, ascending” by default.

Parameters
column

string

desc

boolean

Returns

string

Variables

filterBarContainer

const filterBarContainer: "@container/filters" = "@container/filters"

Put on the list’s container; folds read its width, not the window’s.

Functions

ClearFilters()

ClearFilters(props): Element

Parameters

props

ClearFiltersProps

Returns

Element


FilterBar()

FilterBar(props): Element

Parameters

props

FilterBarProps

Returns

Element


FilterBarSearch()

FilterBarSearch(props): Element

Parameters

props

FilterBarSearchProps

Returns

Element


FilterDropdown()

FilterDropdown<T>(props): Element

A single-choice filter; the first option means no filter.

Type Parameters

T

T extends string | number

Parameters

props

FilterDropdownProps<T>

Returns

Element


FilterFold()

FilterFold(props): Element

Parameters

props

FilterFoldProps

Returns

Element


ListFilters()

ListFilters(props): Element

Parameters

props

ListFiltersProps

Returns

Element


MoreFilters()

MoreFilters(props): Element

Parameters

props

MoreFiltersProps

Returns

Element


tableSortChoice()

tableSortChoice<TData>(table, words?): TableSortChoice

Type Parameters

TData

TData

Parameters

table

Table<TData>

words?

TableSortWords = {}

Returns

TableSortChoice