co-autocomplete
This content is not available in your language yet.
Ver código
<co-autocomplete label="Ejemplo"></co-autocomplete> Props
| Prop | Atributo | Tipo | Default | Descripción |
|---|---|---|---|---|
clearable | clearable | boolean | true | |
disabled | disabled | boolean | false | |
emptyMessage | empty-message | string | 'No results' | Message when options are empty after search |
helperText | helper-text | string | undefined | — | |
iconLeft | icon-left | string | undefined | — | |
label | label | string | undefined | — | |
layout | layout | "horizontal" | "vertical" | 'vertical' | Label layout: vertical (label above) or horizontal (label beside) |
loading | loading | boolean | false | |
minChars | min-chars | number | 1 | Minimum characters before emitting coSearch |
multiple | multiple | boolean | false | |
options | options | AutocompleteOption[] | string | string[] | '[]' | Pre-loaded or server-returned options |
placeholder | placeholder | string | 'Search…' | |
required | required | boolean | false | Whether the field is required (renders a required marker on the label). |
searchDebounce | search-debounce | number | 300 | Debounce time in ms for coSearch |
secondaryLabel | secondary-label | string | undefined | — | |
size | size | "lg" | "md" | "s" | "sm" | 'md' | Field size (mirrors co-input): s 28 / sm 32 / md 40 / lg 48. |
status | status | "default" | "error" | "info" | "success" | "warning" | 'default' | |
value | value | string | string[] | '' |
Eventos
| Evento | Detail | Bubbles | Cancelable | Descripción |
|---|---|---|---|---|
coChange | { value: string | string[]; item: { _id: string; label: string; } | null; } | ✓ | ✓ | |
coClear | void | ✓ | ✓ | |
coSearch | string | ✓ | ✓ | Fired when the user types (after debounce). Host should fetch and set options. |
Slots
Este componente no expone slots.
CSS Parts
Este componente no expone CSS parts.
CSS Custom Properties
Este componente no expone CSS custom properties.