Skip to main content

textField

Description

Optional. Binds combo options to the input field by the specified key

Usage

textField?: string;

Default value

"label"

Example

const dataset = [
{ id: 1, label: "First option", email: "first@mail.com" },
{ id: 2, label: "Second option", email: "second.mayour@mail.com" },
{ id: 3, label: "Third option", email: "third.mayour@mail.com" }
];

// "email" is the label of a field in the data set
// that will be rendered as the text of options in a combo
export default function Example() {
return <Combo options={dataset} textField="email" />;
}

Related article: Configuring the text of the selected option

Related sample: Combo