Skip to content

blocks/resource-select

ResourceOption = object

Caller-provided resource option data.

optional disabled?: boolean

id: string

label: string

optional searchText?: string


ResourceSelectProps = object

Props accepted by ResourceSelect.

onSelect: (option) => void

Called after an option is selected.

ResourceOption

void

options: readonly ResourceOption[]

optional placeholder?: string

optional triggerProps?: ButtonHTMLAttributes<HTMLButtonElement> > & DataAttributes

Native caller metadata, including data-* attributes.

optional value?: string


DataAttributes = Record<`data-${string}`, boolean | number | string | undefined>>

Native data-* attribute map accepted alongside typed props.

const ResourceSelect: ForwardRefExoticComponent<ResourceSelectProps & RefAttributes<HTMLButtonElement>>>>

A resource-selection block with caller-owned options and selected value.