Interface UseSelectProps

Hierarchy

  • UsePopperProps

    Hierarchy

Properties

arrowPadding?: number

The padding required to prevent the arrow from reaching the very edge of the popper.

Default

8

boundary?: HTMLElement | "clippingParents" | "scrollParent"

The boundary area for the popper. Used within the preventOverflow modifier

Default

"clippingParents"

create?: boolean
direction?: "ltr" | "rtl"

Theme direction ltr or rtl. Popper's placement will be set accordingly

Default

"ltr"

disabled?: boolean
duplicates?: boolean
enabled?: boolean

Whether the popper.js should be enabled

eventListeners?: boolean | { resize?: boolean; scroll?: boolean }

If provided, determines whether the popper will reposition itself on scroll and resize of the window.

Default

true

filterFn?: SelectFilter
flip?: boolean

If true, the popper will change its placement and flip when it's about to overflow its boundary area.

Default

true

getDebounce?: GetDebounce
getOption?: GetOption
gutter?: number

The distance or margin between the reference and popper. It is used internally to create an offset modifier.

NB: If you define offset prop, it'll override the gutter.

Default

8

matchWidth?: boolean

If true, the popper will match the width of the reference at all times. It's useful for autocomplete, date-picker and select patterns.

modifiers?: Partial<Modifier<string, any>>[]

Array of popper.js modifiers. Check the docs to see the list of possible modifiers you can pass.

See

Docs https://popper.js.org/docs/v2/modifiers/

offset?: [number, number]

The main and cross-axis offset to displace popper element from its reference element.

onChange: SelectOnChange
options?: Option[]
placeholder?: string
placement?: PlacementWithLogical

The placement of the popper relative to its reference.

Default

"bottom"

preventOverflow?: boolean

If true, will prevent the popper from being cut off and ensure it's visible within the boundary area.

Default

true

scrollToIndex?: ScrollToIndex
searchPlaceholder?: string
selectionVisibleIn?: SelectionVisibilityMode
shiftAmount?: number
single?: boolean
size?: "sm" | "md" | "lg"
stateReducer?: StateReducer
strategy?: "fixed" | "absolute"

The CSS positioning strategy to use.

Default

"absolute"

value?: any

Generated using TypeDoc