SelectProps

Properties

Link copied to clipboard
abstract var areOptionsEqual: (a: OptionValue, b: OptionValue) -> Boolean?

A function used to determine if two options' values are equal. By default, reference equality is used.

Link copied to clipboard
abstract var autoComplete: String?

This prop helps users to fill forms faster, especially on mobile devices. The name can be confusing, as it's more like an autofill. You can learn more about it following the specification.

Link copied to clipboard
abstract var autoFocus: Boolean?

If true, the select element is focused during the first mount

Link copied to clipboard
abstract override var children: ReactNode?
Link copied to clipboard
abstract override var className: ClassName?
Link copied to clipboard
abstract var component: ElementType<*>?
Link copied to clipboard

If true, the select will be initially open.

Link copied to clipboard
abstract var defaultValue: Any?

The default selected value. Use when the component is not controlled.

Link copied to clipboard
abstract var disabled: Boolean?

If true, the select is disabled.

Link copied to clipboard
abstract var getOptionAsString: (option: SelectOption<OptionValue>) -> String?

A function used to convert the option label to a string. It's useful when labels are elements and need to be converted to plain text to enable navigation using character keys on a keyboard.

Link copied to clipboard
abstract var getSerializedValue: Any?

A function to convert the currently selected value to a string. Used to set a value of a hidden input associated with the select, so that the selected value can be posted with a form.

Link copied to clipboard
abstract var key: Key?
Link copied to clipboard
abstract var listboxId: String?

id attribute of the listbox element.

Link copied to clipboard
abstract var listboxOpen: Boolean?

Controls the open state of the select's listbox.

Link copied to clipboard
abstract var multiple: Any?

If true, selecting multiple values is allowed. This affects the type of the value, defaultValue, and onChange props.

Link copied to clipboard
abstract var name: String?

Name of the element. For example used by the server to identify the fields in form submits.

Link copied to clipboard
abstract var onChange: Any?

Callback fired when an option is selected.

Link copied to clipboard
abstract var onListboxOpenChange: (isOpen: Boolean) -> Unit?

Callback fired when the component requests to be opened. Use in controlled mode (see listboxOpen).

Link copied to clipboard
abstract var placeholder: ReactNode?

Text to show when there is no selected value.

Link copied to clipboard
abstract var renderValue: Any?

Function that customizes the rendering of the selected value.

Link copied to clipboard
abstract var required: Boolean?

If true, the Select cannot be empty when submitting form.

Link copied to clipboard

The props used for each slot inside the Input.

Link copied to clipboard
abstract var slots: SelectSlots?

The components used for each slot inside the Select. Either a string to use a HTML element or a component.

Link copied to clipboard
abstract var value: Any?

The selected value. Set to null to deselect all options.

Functions

Link copied to clipboard
open inline fun <P : Props> child(type: ElementType<P>, props: P)
Link copied to clipboard
open inline operator fun <P : Props> ElementType<P>.invoke()
open inline operator fun <P : Props> ElementType<P>.invoke(noinline block: P.() -> Unit)
open inline operator fun <T> Provider<T>.invoke(value: T, noinline block: ChildrenBuilder.() -> Unit)
Link copied to clipboard
open inline operator fun Char.unaryPlus()
open inline operator fun String?.unaryPlus()
open inline operator fun ReactNode?.unaryPlus()
open inline operator fun Props?.unaryPlus()