IO-1407 Resolve bill not clearing on enter again

This commit is contained in:
Patrick Fic
2021-10-18 13:40:31 -07:00
parent 3d8c390291
commit 0d65f8d894
2 changed files with 2 additions and 4 deletions

View File

@@ -216,7 +216,7 @@ function BillEnterModalContainer({
if (enterAgain) { if (enterAgain) {
form.resetFields(); form.resetFields();
form.setFieldsValue(formValues); form.setFieldsValue({ ...form.getFieldsValue(), billlines: [] });
} else { } else {
toggleModalVisible(); toggleModalVisible();
} }

View File

@@ -148,7 +148,7 @@ export function BillEnterModalLinesComponent({
], ],
}; };
}, },
formInput: (record, index, ...restProp) => ( formInput: (record, index) => (
<CurrencyInput <CurrencyInput
min={0} min={0}
disabled={disabled} disabled={disabled}
@@ -156,7 +156,6 @@ export function BillEnterModalLinesComponent({
setFieldsValue({ setFieldsValue({
billlines: getFieldsValue("billlines").billlines.map( billlines: getFieldsValue("billlines").billlines.map(
(item, idx) => { (item, idx) => {
console.log("Checking", index, idx, restProp);
if (idx === index) { if (idx === index) {
console.log( console.log(
"Found and setting.", "Found and setting.",
@@ -493,7 +492,6 @@ const EditableCell = ({
additional, additional,
...restProps ...restProps
}) => { }) => {
console.log(record);
if (additional) if (additional)
return ( return (
<td {...restProps}> <td {...restProps}>