@datagouv/components-next 1.4.1-dev.1372.g3970bd3c → 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.
package/dist/components-next.js
CHANGED
|
@@ -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
|
@@ -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
|
}
|