@aerogel/core 0.1.1-next.6005e06a52b9294023bae608af05bf826d281a4d → 0.1.1-next.67bc601cc533a1a67bccc4e35d9abb10108ced7c
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/package.json
CHANGED
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
|
|
19
19
|
<script setup lang="ts" generic="T extends Nullable<FormFieldValue>">
|
|
20
20
|
import { ComboboxRoot } from 'reka-ui';
|
|
21
|
-
import { computed, ref } from 'vue';
|
|
21
|
+
import { computed, ref, watch } from 'vue';
|
|
22
22
|
import type { AcceptableValue } from 'reka-ui';
|
|
23
23
|
import type { Nullable } from '@noeldemartin/utils';
|
|
24
24
|
|
|
@@ -37,6 +37,7 @@ const emit = defineEmits<SelectEmits<T>>();
|
|
|
37
37
|
const {
|
|
38
38
|
as = 'div',
|
|
39
39
|
compareOptions = (a, b) => a === b,
|
|
40
|
+
newInputValue,
|
|
40
41
|
...props
|
|
41
42
|
} = defineProps<SelectProps<T> & { newInputValue?: (value: string) => T }>();
|
|
42
43
|
const {
|
|
@@ -61,5 +62,6 @@ function update(value: AcceptableValue) {
|
|
|
61
62
|
baseUpdate(value);
|
|
62
63
|
}
|
|
63
64
|
|
|
65
|
+
watch(combobox.input, (value) => update(newInputValue ? (newInputValue(value) as AcceptableValue) : value));
|
|
64
66
|
defineExpose(expose);
|
|
65
67
|
</script>
|
|
@@ -23,7 +23,6 @@ import type { SelectExpose } from '@aerogel/core/components/contracts/Select';
|
|
|
23
23
|
import type { ComboboxContext } from '@aerogel/core/components/contracts/Combobox';
|
|
24
24
|
|
|
25
25
|
const emit = defineEmits<{ focus: []; change: []; blur: [] }>();
|
|
26
|
-
|
|
27
26
|
const select = injectReactiveOrFail<SelectExpose>('select', '<ComboboxTrigger> must be a child of a <Combobox>');
|
|
28
27
|
const combobox = injectReactiveOrFail<ComboboxContext>('combobox');
|
|
29
28
|
const renderedRootClasses = computed(() =>
|