chore: formik updateField

This commit is contained in:
Ibrahima G. Coulibaly
2024-06-27 21:25:11 +01:00
parent a6eb5d59e9
commit da93452bd3
12 changed files with 66 additions and 49 deletions

View File

@@ -5,13 +5,13 @@ import React from 'react';
type OwnProps = {
description?: string;
value: string | number;
onChange: (value: string) => void;
onOwnChange: (value: string) => void;
placeholder?: string;
};
const TextFieldWithDesc = ({
description,
value,
onChange,
onOwnChange,
placeholder,
...props
}: TextFieldProps & OwnProps) => {
@@ -21,7 +21,7 @@ const TextFieldWithDesc = ({
placeholder={placeholder}
sx={{ backgroundColor: 'white' }}
value={value}
onChange={(event) => onChange(event.target.value)}
onChange={(event) => onOwnChange(event.target.value)}
{...props}
/>
{description && (