mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-15 20:30:33 +00:00
fix: fields not saving values in item category dialog
This commit is contained in:
@@ -24,7 +24,7 @@ export default function ItemCategoryForm({
|
||||
accountsList,
|
||||
categoriesList,
|
||||
isSubmitting,
|
||||
onClose
|
||||
onClose,
|
||||
}) {
|
||||
// Filters Item Categories list.
|
||||
const filterItemCategories = useCallback(
|
||||
@@ -74,7 +74,7 @@ export default function ItemCategoryForm({
|
||||
</FastField>
|
||||
|
||||
{/* ----------- Parent Category ----------- */}
|
||||
<FastField name={'parent_account_id'}>
|
||||
<FastField name={'parent_category_id'}>
|
||||
{({ form, field: { value }, meta: { error, touched } }) => (
|
||||
<FormGroup
|
||||
label={<T id={'parent_category'} />}
|
||||
@@ -107,7 +107,7 @@ export default function ItemCategoryForm({
|
||||
</FastField>
|
||||
|
||||
{/* ----------- Description ----------- */}
|
||||
<FastField name={'description`'}>
|
||||
<FastField name={'description'}>
|
||||
{({ field, field: { value }, meta: { error, touched } }) => (
|
||||
<FormGroup
|
||||
label={<T id={'description'} />}
|
||||
@@ -138,7 +138,7 @@ export default function ItemCategoryForm({
|
||||
<AccountsSelectList
|
||||
accounts={accountsList}
|
||||
onAccountSelected={(account) => {
|
||||
form.setFieldValue(account.id);
|
||||
form.setFieldValue('cost_account_id', account.id);
|
||||
}}
|
||||
defaultSelectText={<T id={'select_account'} />}
|
||||
selectedAccountId={value}
|
||||
|
||||
Reference in New Issue
Block a user