@cloudparker/moldex.js 0.0.72 → 0.0.73
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.
|
@@ -34,7 +34,6 @@ let {
|
|
|
34
34
|
hasDropdownHeader,
|
|
35
35
|
hasDropdownHeaderSearch,
|
|
36
36
|
hasItemsCheckbox,
|
|
37
|
-
hasPrimitiveItemsData,
|
|
38
37
|
iconPathClassName,
|
|
39
38
|
iconPathFieldName,
|
|
40
39
|
id,
|
|
@@ -63,6 +62,13 @@ let searchFieldRef = $state(null);
|
|
|
63
62
|
let comboboxIconSizeClassName = $state("");
|
|
64
63
|
let isPlaced = $state(false);
|
|
65
64
|
let searchText = $state("");
|
|
65
|
+
let hasPrimitiveItemsData = $derived.by(() => {
|
|
66
|
+
if (items) {
|
|
67
|
+
let firstItem = items[0];
|
|
68
|
+
return typeof firstItem == "string" || typeof firstItem == "number" || firstItem instanceof Date;
|
|
69
|
+
}
|
|
70
|
+
return false;
|
|
71
|
+
});
|
|
66
72
|
let itemsIdentityMap = {};
|
|
67
73
|
let _value = $derived.by(() => {
|
|
68
74
|
return selectedItemsSet?.size ? " " : "";
|
|
@@ -356,7 +362,8 @@ function handleItemSelected(ev, item, index) {
|
|
|
356
362
|
aria-selected={item.isChecked}
|
|
357
363
|
>
|
|
358
364
|
<ButtonListItem
|
|
359
|
-
{item}
|
|
365
|
+
title={item.title}
|
|
366
|
+
subtitle={item.subtitle}
|
|
360
367
|
{index}
|
|
361
368
|
hasCheckbox={hasItemsCheckbox}
|
|
362
369
|
className=" {itemClassName}"
|
|
@@ -22,7 +22,6 @@ export type ComboboxFieldProps = {
|
|
|
22
22
|
hasDropdownHeader?: boolean;
|
|
23
23
|
hasDropdownHeaderSearch?: boolean;
|
|
24
24
|
hasItemsCheckbox?: boolean;
|
|
25
|
-
hasPrimitiveItemsData?: boolean;
|
|
26
25
|
iconPathClassName?: string;
|
|
27
26
|
iconPathFieldName?: string;
|
|
28
27
|
identityFieldName?: string;
|