Submit changes onBlur
All checks were successful
Check usage of free licenses / build-static-assets (pull_request) Successful in 2m44s
Add copyright notice / copyright_notice (pull_request) Successful in 3m6s
Playwright Tests / test (pull_request) Successful in 7m4s

This commit is contained in:
Manuel Bustillo 2024-11-11 07:58:42 +01:00
parent 9d6f054603
commit 9cb3168097

View File

@ -15,11 +15,6 @@ export default function InlineTextField({ initialValue, onChange }: { initialVal
setEditing(false);
}
const onCancel = () => {
setValue(initialValue);
setEditing(false);
}
function renderForm() {
return (
<div className="flex flex-row">
@ -28,12 +23,9 @@ export default function InlineTextField({ initialValue, onChange }: { initialVal
value={value}
className="px-2 py-0 h-5 max-w-48"
onChange={(e) => setValue(e.target.value)}
onBlur={onConfirm}
autoFocus
/>
<>
<CheckIcon color='green' className="h-5 w-5 mx-2" onClick={onConfirm} />
<XMarkIcon color='red' className="h-5 w-5 mx-2" onClick={onCancel} />
</>
</div>
)
}