feat(blocksAntd): Add onSearch event to AutoComplete.

This commit is contained in:
Gervwyk 2021-10-01 10:50:41 +02:00
parent 406686994f
commit 672624faa9
2 changed files with 7 additions and 0 deletions

View File

@ -70,6 +70,9 @@ const AutoCompleteInput = ({
methods.setValue(val);
methods.triggerEvent({ name: 'onChange' });
}}
onSearch={(newVal) => {
methods.triggerEvent({ name: 'onChange', event: { value: newVal } });
}}
value={type.isNone(value) ? undefined : value}
>
{(properties.options || []).map((opt, i) =>

View File

@ -183,6 +183,10 @@
"onChange": {
"type": "array",
"description": "Trigger actions when selection is changed."
},
"onSearch": {
"type": "array",
"description": "Called when searching items."
}
}
}