fix: symbol error
parent
f5849fad68
commit
08c3c9cc3b
|
@ -50,7 +50,7 @@ const Row: FunctionalComponent<RowProps> = props => {
|
|||
if (typeof component === 'string') {
|
||||
return (
|
||||
<Cell
|
||||
key={`${type}-${key || index}`}
|
||||
key={`${type}-${String(key) || index}`}
|
||||
class={className}
|
||||
style={style}
|
||||
labelStyle={{ ...rootLabelStyle.value, ...labelStyle }}
|
||||
|
@ -68,7 +68,7 @@ const Row: FunctionalComponent<RowProps> = props => {
|
|||
|
||||
return [
|
||||
<Cell
|
||||
key={`label-${key || index}`}
|
||||
key={`label-${String(key) || index}`}
|
||||
class={className}
|
||||
style={{ ...rootLabelStyle.value, ...style, ...labelStyle }}
|
||||
span={1}
|
||||
|
@ -79,7 +79,7 @@ const Row: FunctionalComponent<RowProps> = props => {
|
|||
label={label}
|
||||
/>,
|
||||
<Cell
|
||||
key={`content-${key || index}`}
|
||||
key={`content-${String(key) || index}`}
|
||||
class={className}
|
||||
style={{ ...rootContentStyle.value, ...style, ...contentStyle }}
|
||||
span={span * 2 - 1}
|
||||
|
|
|
@ -7,8 +7,9 @@ function convertNodeToOption(node: VNode): OptionData {
|
|||
key,
|
||||
children,
|
||||
props: { value, disabled, ...restProps },
|
||||
} = node as VNode & {
|
||||
} = node as Omit<VNode, 'key'> & {
|
||||
children: { default?: () => any };
|
||||
key: string | number;
|
||||
};
|
||||
const child = children && children.default ? children.default() : undefined;
|
||||
return {
|
||||
|
@ -16,7 +17,7 @@ function convertNodeToOption(node: VNode): OptionData {
|
|||
value: value !== undefined ? value : key,
|
||||
children: child,
|
||||
disabled: disabled || disabled === '', // support <a-select-option disabled />
|
||||
...restProps,
|
||||
...(restProps as Omit<typeof restProps, 'key'>),
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -46,7 +47,7 @@ export function convertChildrenToData(
|
|||
const child = children && children.default ? children.default() : undefined;
|
||||
const label = props?.label || children.label?.() || key;
|
||||
return {
|
||||
key: `__RC_SELECT_GRP__${key === null ? index : key}__`,
|
||||
key: `__RC_SELECT_GRP__${key === null ? index : String(key)}__`,
|
||||
...props,
|
||||
label,
|
||||
options: convertChildrenToData(child || []),
|
||||
|
|
Loading…
Reference in New Issue