This commit is contained in:
yoyo837 2019-06-28 10:31:40 +08:00
parent c8d5243b97
commit 50f6b9c903

View File

@ -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;
}), }),
); );
} }