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