Sort values in CheckboxGroup component

[MAILPOET-2773]
This commit is contained in:
Ján Mikláš
2020-05-22 11:20:44 +02:00
committed by Veljko V
parent 14352f8da3
commit 6603fd89fd

View File

@@ -33,6 +33,7 @@ const CheckboxGroup = ({
if (!isChecked && index !== -1) {
newValues = values.filter((val: CheckboxValueType) => val !== value);
}
newValues.sort();
setValues(newValues);
onChange(newValues);
};