mirror of
https://gitee.com/baidu/amis.git
synced 2024-12-02 03:58:07 +08:00
考虑 withChildren 的情况
This commit is contained in:
parent
0b69f5ed1b
commit
2975f1f0b2
@ -294,12 +294,14 @@ export class TreeSelector extends React.Component<
|
||||
if (
|
||||
parent.children.every((child: any) => ~value.indexOf(child))
|
||||
) {
|
||||
if (!props.withChildren) {
|
||||
parent.children.forEach((child: any) => {
|
||||
const index = value.indexOf(child);
|
||||
if (~index) {
|
||||
value.splice(index, 1);
|
||||
}
|
||||
});
|
||||
}
|
||||
value.push(parent);
|
||||
toCheck = parent;
|
||||
continue;
|
||||
|
Loading…
Reference in New Issue
Block a user