-
Notifications
You must be signed in to change notification settings - Fork 5
XcFormAutocomplete (and Dropdown)
PatrickVonMassow-GIP edited this page Aug 21, 2024
·
5 revisions
XcFormAutocomplete
A field with a value in it, where the value can be selected from a dropdown list. Dependent on how the XcFormAutocomplete
is configured, it behaves like a typical dropdown field or like an input field with proposed values.
-
xc-form-autocomplete-option
: Input and output to bind the currently selected value to -
xc-form-autocomplete-options
: Array containing possible options -
xc-form-autocomplete-asdropdown
: Autocomplete behaves like a dropdown (not possible to type text into the field) -
xc-form-autocomplete-asinput
: Insert a text into the field that is not included inoptions
<xc-form-autocomplete
label="Color"
placeholder="choose color..."
[(xc-form-autocomplete-option)]="color"
[xc-form-autocomplete-options]="colors"
></xc-form-autocomplete>
color: string;
colors: XcOptionItem[] = [{
name: 'white',
value: '#eee'
}, {
name: 'black',
value: '#111'
}, {
name: 'red',
value: '#c32'
}];