Don’t allow bulk editing to set a field to null (#705)

This commit is contained in:
Jed Fox
2023-02-28 13:09:35 -05:00
committed by GitHub
parent b90da4404c
commit 72f4f1523c

View File

@@ -28,12 +28,14 @@ function EditField({
createPayee, createPayee,
}) { }) {
function onSelect(value) { function onSelect(value) {
// Process the value if needed if (value != null) {
if (name === 'amount') { // Process the value if needed
value = amountToInteger(value); if (name === 'amount') {
} value = amountToInteger(value);
}
onSubmit(name, value); onSubmit(name, value);
}
modalProps.onClose(); modalProps.onClose();
} }