mirror of
https://gitee.com/baidu/amis.git
synced 2024-12-04 04:48:32 +08:00
fix: Tabs、table2 warning 问题修复 (#6072)
* fix: Tabs warning 问题修复 * fix: table2 warning 问题修复
This commit is contained in:
parent
74796dd258
commit
c6675b1bc7
@ -244,9 +244,8 @@ export class Tabs extends React.Component<TabsProps, any> {
|
||||
activeKey: this.props.activeKey,
|
||||
children: Array.isArray(this.props.children)
|
||||
? this.props.children!.map(item => ({
|
||||
key: item?.props.key,
|
||||
eventKey: item?.props.eventKey,
|
||||
label: item?.props.label
|
||||
eventKey: item?.props?.eventKey,
|
||||
title: item?.props?.title
|
||||
}))
|
||||
: this.props.children
|
||||
},
|
||||
@ -254,9 +253,8 @@ export class Tabs extends React.Component<TabsProps, any> {
|
||||
activeKey: preProps.activeKey,
|
||||
children: Array.isArray(preProps.children)
|
||||
? preProps.children!.map((item: any) => ({
|
||||
key: item?.props.key,
|
||||
eventKey: item?.props.eventKey,
|
||||
label: item?.props.label
|
||||
eventKey: item?.props?.eventKey,
|
||||
title: item?.props?.title
|
||||
}))
|
||||
: preProps.children
|
||||
}
|
||||
|
@ -1050,7 +1050,7 @@ export class Table extends React.PureComponent<TableProps, TableState> {
|
||||
<HeadCellSort
|
||||
column={item}
|
||||
active={
|
||||
this.state.sort?.orderBy &&
|
||||
!!this.state.sort?.orderBy &&
|
||||
this.state.sort.orderBy === item?.name
|
||||
}
|
||||
onSort={(payload: SortProps) => {
|
||||
|
Loading…
Reference in New Issue
Block a user