@threadlabs/looma 0.26.22 → 0.26.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/ui-combobox/ui-combobox.html +4 -0
- package/components/ui-combobox/ui-combobox.js +1 -0
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/vanilla/UiCombobox.d.ts +1 -0
- package/vanilla/UiCombobox.js +69 -71
- package/vue/UiCombobox.d.ts +9 -0
- package/vue/UiCombobox.vue +25 -0
- package/vue/chunks/UiCombobox.js +23 -1
- package/vue/components.css +53 -53
|
@@ -61,6 +61,10 @@
|
|
|
61
61
|
>Commits a highlighted authored suggestion on forward Tab, then lets focus advance normally. In multiple mode a selected suggestion is retained without
|
|
62
62
|
duplication or removal. Shift+Tab does not commit, and Tab never chooses the create offer.</prop>
|
|
63
63
|
<prop name="allowFreeText" type="boolean" default="false">Allows values that do not match an authored option.</prop>
|
|
64
|
+
<prop name="clearQueryOnBlur" type="boolean" default="false"
|
|
65
|
+
>In multiple mode, clears unfinished search text when focus leaves the whole combobox, preserving selected items. A controlled query reports query-change
|
|
66
|
+
with an empty query; the consumer must reflect it back. Does not choose or create an option. The default preserves unfinished text. Single mode keeps
|
|
67
|
+
its existing selection and free-text resolution.</prop>
|
|
64
68
|
<prop name="allowCreate" type="boolean" default="false"
|
|
65
69
|
>Offers the current query as a new option, reported as create-item. When nothing else matches, the offer is highlighted, so Enter creates it; with nothing
|
|
66
70
|
highlighted, Enter in multiple mode commits the typed text as a token separator does.</prop>
|
|
@@ -471,6 +471,7 @@ function connect(host) {
|
|
|
471
471
|
const onFocusout = (event) => {
|
|
472
472
|
if (event.relatedTarget instanceof Node && element.contains(event.relatedTarget)) return;
|
|
473
473
|
close();
|
|
474
|
+
if (host.props.multiple.value && host.props.clearQueryOnBlur.value && host.state.raw) setMultiQuery("", "pointer");
|
|
474
475
|
host.state.validation = { ...host.state.validation, touched: true };
|
|
475
476
|
resolveTyped("pointer");
|
|
476
477
|
if (!host.props.multiple.value && config().allowFreeText && host.state.selected === null) commit(null, host.state.raw, null, "free-entry", "keyboard");
|