diff --git a/src/components/admin/resources/form.tsx b/src/components/admin/resources/form.tsx index 8aa3672..8e1d4bc 100644 --- a/src/components/admin/resources/form.tsx +++ b/src/components/admin/resources/form.tsx @@ -127,12 +127,14 @@ function ResourceSummarySubForm({ ({ value, placeholder, hint, + details, }: { value: string; placeholder: string; hint?: string; -}) => { - const [currentValue, setCurrentValue] = useState(value); + details: UseFormRegisterReturn; +}) { + const [curValue, setCurValue] = useState(value); return (
{ - setCurrentValue(event.target.value); + setCurValue(event.target.value); + details.onChange(event).catch((e) => { + console.error(e); + }); }} placeholder={placeholder} - value={currentValue} type="text" className="w-full border-b border-neutral-300 px-2" />
); -}; +} export { InfoInputLine };