mirror of
https://github.com/ant-design/ant-design.git
synced 2024-12-18 11:18:14 +08:00
fix: Transfer throw error whentitles
is undefined (#38182)
Co-authored-by: tangwenhui <tangwenhui@rd.netease.com>
This commit is contained in:
parent
072fda0f15
commit
2a1f2836f4
@ -398,7 +398,7 @@ class Transfer<RecordType extends TransferItem = TransferItem> extends React.Com
|
||||
<div className={cls} style={style}>
|
||||
<List<KeyWise<RecordType>>
|
||||
prefixCls={`${prefixCls}-list`}
|
||||
titleText={titles[0]}
|
||||
titleText={titles?.[0]}
|
||||
dataSource={leftDataSource}
|
||||
filterOption={filterOption}
|
||||
style={this.handleListStyle(listStyle, 'left')}
|
||||
@ -434,7 +434,7 @@ class Transfer<RecordType extends TransferItem = TransferItem> extends React.Com
|
||||
/>
|
||||
<List<KeyWise<RecordType>>
|
||||
prefixCls={`${prefixCls}-list`}
|
||||
titleText={titles[1]}
|
||||
titleText={titles?.[1]}
|
||||
dataSource={rightDataSource}
|
||||
filterOption={filterOption}
|
||||
style={this.handleListStyle(listStyle, 'right')}
|
||||
|
Loading…
Reference in New Issue
Block a user