@zag-js/combobox 1.15.1 → 1.15.3

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/dist/index.js CHANGED
@@ -1409,14 +1409,16 @@ var machine = createMachine({
1409
1409
  });
1410
1410
  },
1411
1411
  syncSelectedItems(params) {
1412
- const { context, prop } = params;
1413
- const inputValue = utils.match(prop("selectionBehavior"), {
1414
- preserve: context.get("inputValue"),
1415
- replace: prop("collection").stringifyMany(context.get("value")),
1416
- clear: ""
1412
+ queueMicrotask(() => {
1413
+ const { context, prop } = params;
1414
+ const inputValue = utils.match(prop("selectionBehavior"), {
1415
+ preserve: context.get("inputValue"),
1416
+ replace: prop("collection").stringifyMany(context.get("value")),
1417
+ clear: ""
1418
+ });
1419
+ context.set("selectedItems", getSelectedItems(params));
1420
+ context.set("inputValue", inputValue);
1417
1421
  });
1418
- context.set("selectedItems", getSelectedItems(params));
1419
- context.set("inputValue", inputValue);
1420
1422
  },
1421
1423
  syncHighlightedItem({ context, prop }) {
1422
1424
  const item = prop("collection").find(context.get("highlightedValue"));
package/dist/index.mjs CHANGED
@@ -1407,14 +1407,16 @@ var machine = createMachine({
1407
1407
  });
1408
1408
  },
1409
1409
  syncSelectedItems(params) {
1410
- const { context, prop } = params;
1411
- const inputValue = match(prop("selectionBehavior"), {
1412
- preserve: context.get("inputValue"),
1413
- replace: prop("collection").stringifyMany(context.get("value")),
1414
- clear: ""
1410
+ queueMicrotask(() => {
1411
+ const { context, prop } = params;
1412
+ const inputValue = match(prop("selectionBehavior"), {
1413
+ preserve: context.get("inputValue"),
1414
+ replace: prop("collection").stringifyMany(context.get("value")),
1415
+ clear: ""
1416
+ });
1417
+ context.set("selectedItems", getSelectedItems(params));
1418
+ context.set("inputValue", inputValue);
1415
1419
  });
1416
- context.set("selectedItems", getSelectedItems(params));
1417
- context.set("inputValue", inputValue);
1418
1420
  },
1419
1421
  syncHighlightedItem({ context, prop }) {
1420
1422
  const item = prop("collection").find(context.get("highlightedValue"));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zag-js/combobox",
3
- "version": "1.15.1",
3
+ "version": "1.15.3",
4
4
  "description": "Core logic for the combobox widget implemented as a state machine",
5
5
  "keywords": [
6
6
  "js",
@@ -26,15 +26,15 @@
26
26
  "url": "https://github.com/chakra-ui/zag/issues"
27
27
  },
28
28
  "dependencies": {
29
- "@zag-js/anatomy": "1.15.1",
30
- "@zag-js/aria-hidden": "1.15.1",
31
- "@zag-js/collection": "1.15.1",
32
- "@zag-js/core": "1.15.1",
33
- "@zag-js/dismissable": "1.15.1",
34
- "@zag-js/dom-query": "1.15.1",
35
- "@zag-js/utils": "1.15.1",
36
- "@zag-js/popper": "1.15.1",
37
- "@zag-js/types": "1.15.1"
29
+ "@zag-js/anatomy": "1.15.3",
30
+ "@zag-js/aria-hidden": "1.15.3",
31
+ "@zag-js/collection": "1.15.3",
32
+ "@zag-js/core": "1.15.3",
33
+ "@zag-js/dismissable": "1.15.3",
34
+ "@zag-js/dom-query": "1.15.3",
35
+ "@zag-js/utils": "1.15.3",
36
+ "@zag-js/popper": "1.15.3",
37
+ "@zag-js/types": "1.15.3"
38
38
  },
39
39
  "devDependencies": {
40
40
  "clean-package": "2.2.0"