@datagouv/components-next 1.4.1-dev.1371.ge3406487 → 1.4.1-dev.1373.g379aceb6

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.
@@ -56224,7 +56224,7 @@ var rse = ["for", "title"], ise = {
56224
56224
  return e;
56225
56225
  });
56226
56226
  function g(e, t) {
56227
- return e === t ? !0 : !e || !t ? !1 : n.getOptionId(e) === n.getOptionId(t);
56227
+ return e === t ? !0 : !e || !t || Array.isArray(e) || Array.isArray(t) ? !1 : n.getOptionId(e) === n.getOptionId(t);
56228
56228
  }
56229
56229
  function _(e, t) {
56230
56230
  return e ? n.getOptionId(e) === n.getOptionId(t) : !1;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@datagouv/components-next",
3
- "version": "1.4.1-dev.1371.ge3406487",
3
+ "version": "1.4.1-dev.1373.g379aceb6",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "engines": {
@@ -311,6 +311,10 @@ const filteredAndGroupedOptions = computed<Record<string, Array<T>>>(() => {
311
311
  function compareTwoOptions(a: T | null, b: T | null) {
312
312
  if (a === b) return true
313
313
  if (!a || !b) return false
314
+ // In multiple mode, Headless UI compares the options with the whole selection array
315
+ // when the combobox reopens while its options are still mounted (leave transition).
316
+ // No option matches the selection itself, like with Headless UI's default `===` comparator.
317
+ if (Array.isArray(a) || Array.isArray(b)) return false
314
318
 
315
319
  return props.getOptionId(a) === props.getOptionId(b)
316
320
  }