feat: save edited custom object (#2204)

Closes #2153

Co-authored-by: Charles Bochet <charlesBochet@users.noreply.github.com>
This commit is contained in:
Thaïs
2023-10-24 08:33:35 +02:00
committed by GitHub
parent 291feae595
commit 7a3338b4de
4 changed files with 104 additions and 30 deletions

View File

@ -12,8 +12,8 @@ type SettingsObjectFormSectionProps = {
description?: string;
onChange?: (
formValues: Partial<{
singularName: string;
pluralName: string;
labelSingular: string;
labelPlural: string;
description: string;
}>,
) => void;
@ -43,7 +43,7 @@ export const SettingsObjectFormSection = ({
label="Singular"
placeholder="Investor"
value={singularName}
onChange={(value) => onChange?.({ singularName: value })}
onChange={(value) => onChange?.({ labelSingular: value })}
disabled={disabled}
fullWidth
/>
@ -51,7 +51,7 @@ export const SettingsObjectFormSection = ({
label="Plural"
placeholder="Investors"
value={pluralName}
onChange={(value) => onChange?.({ pluralName: value })}
onChange={(value) => onChange?.({ labelPlural: value })}
disabled={disabled}
fullWidth
/>