mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-24 19:19:57 +08:00
update
This commit is contained in:
parent
c8d5243b97
commit
50f6b9c903
@ -143,13 +143,7 @@ class CheckboxGroup extends React.Component<CheckboxGroupProps, CheckboxGroupSta
|
|||||||
.sort((a, b) => {
|
.sort((a, b) => {
|
||||||
const indexA = options.findIndex(opt => opt.value === a);
|
const indexA = options.findIndex(opt => opt.value === a);
|
||||||
const indexB = options.findIndex(opt => opt.value === b);
|
const indexB = options.findIndex(opt => opt.value === b);
|
||||||
if (indexA > indexB) {
|
return indexA - indexB;
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
if (indexA < indexB) {
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user