Skip to content
On this page

Options

Options and their dependency to each other always were a huge problem in older Systems. Because of this our focus was to give everyone a better experience handling those through providing new ways to work with options and their conditions.

Key

NameTypeDefinition
displaystring | array | function { value: "value", label: "label"}

Code Example

String

html
<IuInput options="/api/endpoint/{<otherFieldValue>}/{<otherFieldValue>}"></IuInput>

For Endpoints we have come up with a solution where all you need to define is your targetUrl. Dynamic fields trigger new API calls whenever one of the given field(s) changes.

Function

html
<IuInput :options="(store) => store.v1 === 1 ? [...] : [...]"></IuInput>

Functions are a new way to define your Options. Handle the logic yourself. define return statements that return the array of options you need.

Array

html
<IuInput :options="[{value: 'v1', label: 'l1'}, {value: 'v2', label: 'l2'}]"></IuInput>

Simple arrays define options that won't change through anything. Use them for fields like salutation.