Files
bigcapital/client/src/containers/Dialogs/AllocateLandedCostDialog/AllocateLandedCostFormBody.js
2021-07-21 23:47:40 +02:00

27 lines
757 B
JavaScript

import React from 'react';
import { FastField } from 'formik';
import classNames from 'classnames';
import { CLASSES } from 'common/classes';
import AllocateLandedCostEntriesTable from './AllocateLandedCostEntriesTable';
export default function AllocateLandedCostFormBody() {
return (
<div className={classNames(CLASSES.PAGE_FORM_BODY)}>
<FastField name={'entries'}>
{({
form: { setFieldValue, values },
field: { value },
meta: { error, touched },
}) => (
<AllocateLandedCostEntriesTable
entries={value}
onUpdateData={(newEntries) => {
setFieldValue('entries', newEntries);
}}
/>
)}
</FastField>
</div>
);
}