We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 542b7a9 commit 1be8b11Copy full SHA for 1be8b11
packages/core/src/components/Picker/PickerCommon.ts
@@ -59,14 +59,18 @@ export function normalizeToPickerOptions(
59
60
const firstOption = options[0];
61
62
- if (typeof firstOption === ("string" || "number")) {
+ if (typeof firstOption === "string" || typeof firstOption === "number") {
63
return options.map((option) => ({
64
label: option as string | number,
65
value: option as string | number,
66
}));
67
}
68
69
- if (isObject(firstOption) && firstOption.value && firstOption.label) {
+ if (
70
+ isObject(firstOption) &&
71
+ firstOption.value !== undefined &&
72
+ firstOption.label !== undefined
73
+ ) {
74
return (options as PickerOption[]).map((option) => {
75
return {
76
label: option.label,
0 commit comments