@skeletonlabs/skeleton 1.6.2-dev.03d2eabc → 1.6.2-dev.24d8d841
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.
|
@@ -11,6 +11,23 @@ const cBase = "cursor-pointer -outline-offset-[3px]";
|
|
|
11
11
|
const cLabel = "flex items-center space-x-4";
|
|
12
12
|
let checked;
|
|
13
13
|
let elemInput;
|
|
14
|
+
function areDeeplyEqual(param1, param2) {
|
|
15
|
+
if (param1 === param2)
|
|
16
|
+
return true;
|
|
17
|
+
if (!(param1 instanceof Object) || !(param2 instanceof Object))
|
|
18
|
+
return false;
|
|
19
|
+
const keys1 = Object.keys(param1);
|
|
20
|
+
const keys2 = Object.keys(param2);
|
|
21
|
+
if (keys1.length !== keys2.length)
|
|
22
|
+
return false;
|
|
23
|
+
for (const key of keys1) {
|
|
24
|
+
const value1 = param1[key];
|
|
25
|
+
const value2 = param2[key];
|
|
26
|
+
if (!areDeeplyEqual(value1, value2))
|
|
27
|
+
return false;
|
|
28
|
+
}
|
|
29
|
+
return true;
|
|
30
|
+
}
|
|
14
31
|
$:
|
|
15
32
|
if (multiple)
|
|
16
33
|
updateCheckbox(group);
|
|
@@ -41,7 +58,7 @@ function onKeyDown(event) {
|
|
|
41
58
|
}
|
|
42
59
|
}
|
|
43
60
|
$:
|
|
44
|
-
selected = multiple ? group.
|
|
61
|
+
selected = multiple ? group.some((groupVal) => areDeeplyEqual(value, groupVal)) : areDeeplyEqual(group, value);
|
|
45
62
|
$:
|
|
46
63
|
classesActive = selected ? active : hover;
|
|
47
64
|
$:
|