@lumx/vue 4.19.1-alpha.8 → 4.19.1-alpha.9
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/combobox/context/useComboboxEvent.d.ts +10 -0
- package/index.js +3495 -3503
- package/index.js.map +1 -1
- package/package.json +3 -3
|
@@ -2,6 +2,16 @@ import { Ref } from 'vue';
|
|
|
2
2
|
import { ComboboxEventMap } from '@lumx/core/js/components/Combobox/types';
|
|
3
3
|
/**
|
|
4
4
|
* Composable to subscribe to a combobox event via the handle's subscriber system.
|
|
5
|
+
*
|
|
6
|
+
* `optionsChange` updates are coalesced into a microtask. Mounting a large option list fires one
|
|
7
|
+
* `optionsChange` per option registration; applying each synchronously makes a consumer that both
|
|
8
|
+
* reads the option count and (re)mounts options — e.g. `Combobox.Input` — mutate its own render
|
|
9
|
+
* dependency, tripping Vue's recursive-update guard. Coalescing applies only the final value, once
|
|
10
|
+
* per tick. Other events are applied synchronously.
|
|
11
|
+
*
|
|
12
|
+
* (React does not need this: it batches synchronous store updates itself, and coalescing there
|
|
13
|
+
* would defer the update into a microtask that fires outside `act` in consumers' unit tests.)
|
|
14
|
+
*
|
|
5
15
|
* Re-subscribes when the handle changes (e.g. trigger mount/unmount).
|
|
6
16
|
*/
|
|
7
17
|
export declare function useComboboxEvent<K extends keyof ComboboxEventMap>(event: K, initialValue: ComboboxEventMap[K]): Ref<ComboboxEventMap[K]>;
|