提交 4663995f 编写于 作者: B Benjy Cui

fix: should follow the targetKeys' order, close: #3152

上级 feb7a88c
......@@ -121,7 +121,13 @@ export default class Transfer extends React.Component<TransferProps, any> {
}
const leftDataSource = dataSource.filter(({ key }) => targetKeys.indexOf(key) === -1);
const rightDataSource = dataSource.filter(({ key }) => targetKeys.indexOf(key) >= 0);
const rightDataSource = [];
targetKeys.forEach((targetKey) => {
const targetItem = dataSource.filter(record => record.key === targetKey)[0];
if (targetItem) {
rightDataSource.push(targetItem);
}
});
this.splitedDataSource = {
leftDataSource,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册