From 3d8c3902910e8adb93259f8aee4ed4e45960d370 Mon Sep 17 00:00:00 2001 From: Patrick Fic <> Date: Mon, 18 Oct 2021 13:29:35 -0700 Subject: [PATCH] IO-1408 Resolve bill form index issue. --- .../bill-form/bill-form.lines.component.jsx | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/client/src/components/bill-form/bill-form.lines.component.jsx b/client/src/components/bill-form/bill-form.lines.component.jsx index 0327671ef..03e71f6c7 100644 --- a/client/src/components/bill-form/bill-form.lines.component.jsx +++ b/client/src/components/bill-form/bill-form.lines.component.jsx @@ -148,7 +148,7 @@ export function BillEnterModalLinesComponent({ ], }; }, - formInput: (record, index) => ( + formInput: (record, index, ...restProp) => ( { - console.log("Checking", index, idx); + console.log("Checking", index, idx, restProp); if (idx === index) { console.log( "Found and setting.", @@ -493,6 +493,7 @@ const EditableCell = ({ additional, ...restProps }) => { + console.log(record); if (additional) return ( @@ -502,9 +503,9 @@ const EditableCell = ({ labelCol={{ span: 0 }} {...(formItemProps && formItemProps(record))} > - {(formInput && formInput(record, record.key)) || children} + {(formInput && formInput(record, record.name)) || children} - {additional && additional(record, record.key)} + {additional && additional(record, record.name)} ); @@ -516,7 +517,7 @@ const EditableCell = ({ name={dataIndex} {...(formItemProps && formItemProps(record))} > - {(formInput && formInput(record, record.key)) || children} + {(formInput && formInput(record, record.name)) || children} );