Der Fall im ant.design-Dokument:
const children: React.ReactNode[] = [];
for (let i = 10; i < 36; i++) {
children.push(<Option key={
i.toString(36) + i}>{
i.toString(36) + i}</Option>);
}
Lösung:
Ersetzen Sie das Formular Optionen durch das Formular
React.createElement(
Select.Option,
{
label,
value,
key: key || value,
},
label
);
});
Modifizierter Fall:
const children: React.ReactNode[] = [];
for (let i = 10; i < 36; i++) {
let t = i.toString(36) + i
children.push(
React.createElement(
Select.Option,
{
label: t,
value: t,
key: t || value,
},
t
)
);
}