svelte-select-5 6.1.2 → 6.1.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/Select.svelte +5 -1
- package/no-styles/Select.svelte +5 -1
- package/package.json +1 -1
package/Select.svelte
CHANGED
|
@@ -195,7 +195,11 @@
|
|
|
195
195
|
label: value,
|
|
196
196
|
};
|
|
197
197
|
} else if (multiple && Array.isArray(value) && value.length > 0) {
|
|
198
|
-
|
|
198
|
+
// Only transform if there are string items that need conversion
|
|
199
|
+
const hasStringItems = value.some(item => typeof item === 'string');
|
|
200
|
+
if (hasStringItems) {
|
|
201
|
+
value = value.map((item) => (typeof item === 'string' ? { value: item, label: item } : item));
|
|
202
|
+
}
|
|
199
203
|
}
|
|
200
204
|
}
|
|
201
205
|
|
package/no-styles/Select.svelte
CHANGED
|
@@ -195,7 +195,11 @@
|
|
|
195
195
|
label: value,
|
|
196
196
|
};
|
|
197
197
|
} else if (multiple && Array.isArray(value) && value.length > 0) {
|
|
198
|
-
|
|
198
|
+
// Only transform if there are string items that need conversion
|
|
199
|
+
const hasStringItems = value.some(item => typeof item === 'string');
|
|
200
|
+
if (hasStringItems) {
|
|
201
|
+
value = value.map((item) => (typeof item === 'string' ? { value: item, label: item } : item));
|
|
202
|
+
}
|
|
199
203
|
}
|
|
200
204
|
}
|
|
201
205
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "svelte-select-5",
|
|
3
|
-
"version": "6.1.
|
|
3
|
+
"version": "6.1.3",
|
|
4
4
|
"description": "A <Select> component for Svelte 5 apps (fork of svelte-select)",
|
|
5
5
|
"repository": "https://github.com/Dbone29/svelte-select-5.git",
|
|
6
6
|
"author": "Robert Balfré <rob.balfre@gmail.com> (https://github.com/rob-balfre)",
|