edit-typeahead
Last updated
Last updated
The edit-typeahead
cell type of an object-table
displays a list of options in a dropdown format. An option can be selected by the user and a consequent action can fire. It includes a search field to allow users to more easily navigate the listed options. edit-typeahead
is a more advanced version of edit-select
in that it provides fine grained control over how options are displayed and at what stage they are available.
on-search
Required
Default: unset
Triggered when: The cell is selected or when the user starts to search
Event parameters: $object,
searchValue
Return value: See more information below.
on-search
is an event that calls a JS/TS $:function
or navigation. See more details:
In this above, searchValue
will contain null
when edit-typeahead
is opened for the first time and will fire again as the user starts typing. If the user clears the text in the search box the searchValue
will return to null
.
The on-search
function should return an array of objects with the following fields:
The on-search
function can also return sets of grouped items:
The syntax for grouped items includes the following fields:
clear-icon
Version compatibility
clear-icon
was introduced in version 4.89.17 of the JourneyApps Runtime.
Optional
Type: string
Default: "fa-times"
Specify the icon on the right side of the input that appears when an option was selected. Find a list of available icons here.
empty-message
Optional
Type: string
(static text, a format string or the return value of a JS/TS function)
Default: unset
Text that is displayed if no options are available when the user opens the edit-typeahead
cell or performs a search.
show-if
and hide-if
Field | Required? | Description |
---|---|---|
Field | Required? | Description |
---|---|---|
label
Required
Text that is displayed on each option
key
Required
A unique identifier for each option
icon
Optional
Places an icon on the left of each option
subtext
Optional
Subtext that is displayed on each option below the label, in a smaller font
label
Required
The group name that is displayed above the items in the group
items
Required
An array of item objects - see the previous table for details.