+ CAutoComplete is a text input with string suggestions. Users may select a
+ suggestion or keep any arbitrary text they enter.
+
+
+
+
+
+
String suggestions
+
+ Pass a simple array of strings through options. Matching is case-insensitive
+ and checks the entire string. Because the options have no object mapping, the API does not
+ need option-label, option-value, or option-key.
+
+
+
+
+
+ Current value: {{ destination }}
+
+
+
+
+
+
+
Arbitrary values
+
+ Typing updates v-model immediately, even when the text is absent from
+ options. Suggestions assist entry but do not constrain it. The
+ select event is emitted only when a listed suggestion is explicitly chosen.
+
+
+
+
+
+ Current value: {{ department }}
+
+
+
+
+
+
Keyboard usage
+
+ Use Arrow Up or Arrow Down to move through suggestions, Enter to accept the highlighted
+ suggestion, and Escape to close the list without changing the current text. Tab keeps the
+ arbitrary value and moves focus normally.
+
+
+
+
+
Remote suggestions
+
+ The component does not make network requests itself. After the user pauses typing,
+ search emits the trimmed query and the parent replaces options.
+ debounce-wait controls that pause, while min-search-length prevents
+ short queries from starting a search.
+
+
+ When the query drops below the minimum, an empty search is emitted immediately so the
+ parent can cancel work and clear stale results. Set loading while awaiting the
+ response; users can continue typing while the spinner is visible.
+
+
+
+
+
+ Current value: {{ remoteCity }}
+
+
+
+
+
+
+
Sizes and states
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Properties and events
+
+
model-value
Current string, including values absent from the suggestion list.
+
options
Array of strings used as suggestions.
+
debounce-wait
Milliseconds to wait before emitting a non-empty search. Defaults to 300.
+
loading
Shows remote loading feedback without disabling text entry.
+
min-search-length
Minimum trimmed query length required before emitting a non-empty search.
+
clearable
Adds a compact button that clears the value to an empty string.
+
placeholder
Text displayed while the value is empty.
+
size
small, medium, or large.
+
disabled
Disables input and focus.
+
required
Applies native required validation.
+
invalid
Applies invalid styling and aria-invalid.
+
search
Emitted with the debounced query, or immediately with an empty string when below the minimum.
+
select
Emitted with the string when a suggestion is explicitly selected.
+
clear
Emitted after the clear button resets the value.
+
+
+
+
+
+
diff --git a/src/pages/components/Select.vue b/src/pages/components/Select.vue
index 76d5a2f..2d76d3c 100644
--- a/src/pages/components/Select.vue
+++ b/src/pages/components/Select.vue
@@ -1,5 +1,5 @@
@@ -123,7 +161,7 @@ const filterableUsage = `
Add filterable when a long list should be searchable. Typing narrows the
available options but does not create a new value: v-model changes only when
- the user selects an existing option. Use CAutoComplete later when arbitrary
+ the user selects an existing option. Use CAutoComplete when arbitrary
user-entered values should be allowed.
+ In filterable mode, search emits the trimmed query after
+ debounce-wait. The parent performs the request and replaces
+ options. Use min-search-length to avoid short requests and set
+ loading while awaiting the response.
+
+
+ Searching never changes v-model. The last resolved label is cached with its
+ selected value, so replacing the options—even with results that omit the selected
+ record—does not make the committed selection disappear. Escape or blur restores that
+ cached label. An initially loaded primitive value must still have its matching option
+ supplied at least once so its label can be learned.
+