next-recomponents 2.0.54 → 2.0.55
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/index.js +4 -2
- package/dist/index.mjs +4 -2
- package/package.json +1 -1
- package/src/select/index.tsx +3 -2
package/dist/index.js
CHANGED
|
@@ -36786,9 +36786,11 @@ function Select({
|
|
|
36786
36786
|
const parsedOptions = import_react9.default.Children.toArray(children).filter((child) => {
|
|
36787
36787
|
return child.type === "option";
|
|
36788
36788
|
}).map((child) => {
|
|
36789
|
+
var _a2;
|
|
36790
|
+
const label2 = import_react9.default.Children.toArray(child.props.children).join("");
|
|
36789
36791
|
return {
|
|
36790
|
-
value: child.props.value,
|
|
36791
|
-
label:
|
|
36792
|
+
value: ((_a2 = child.props) == null ? void 0 : _a2.value) || label2,
|
|
36793
|
+
label: label2
|
|
36792
36794
|
};
|
|
36793
36795
|
});
|
|
36794
36796
|
setOptions(parsedOptions);
|
package/dist/index.mjs
CHANGED
|
@@ -36771,9 +36771,11 @@ function Select({
|
|
|
36771
36771
|
const parsedOptions = React5.Children.toArray(children).filter((child) => {
|
|
36772
36772
|
return child.type === "option";
|
|
36773
36773
|
}).map((child) => {
|
|
36774
|
+
var _a2;
|
|
36775
|
+
const label2 = React5.Children.toArray(child.props.children).join("");
|
|
36774
36776
|
return {
|
|
36775
|
-
value: child.props.value,
|
|
36776
|
-
label:
|
|
36777
|
+
value: ((_a2 = child.props) == null ? void 0 : _a2.value) || label2,
|
|
36778
|
+
label: label2
|
|
36777
36779
|
};
|
|
36778
36780
|
});
|
|
36779
36781
|
setOptions(parsedOptions);
|
package/package.json
CHANGED
package/src/select/index.tsx
CHANGED
|
@@ -85,9 +85,10 @@ export default function Select({
|
|
|
85
85
|
return (child as ReactElement).type === "option";
|
|
86
86
|
})
|
|
87
87
|
.map((child: any) => {
|
|
88
|
+
const label = React.Children.toArray(child.props.children).join("");
|
|
88
89
|
return {
|
|
89
|
-
value: child.props
|
|
90
|
-
label
|
|
90
|
+
value: child.props?.value || label,
|
|
91
|
+
label,
|
|
91
92
|
};
|
|
92
93
|
});
|
|
93
94
|
setOptions(parsedOptions);
|