fix: empty event form edit fields
Some checks failed
container-scan / Container Scan (pull_request) Failing after 31s
tests / Tests (pull_request) Has been cancelled
docker-build / docker (pull_request) Failing after 2m30s

This commit is contained in:
Dominik 2025-07-01 08:55:53 +02:00
parent dbf9809c7b
commit b5602bead5
Signed by: dominik
GPG key ID: 06A4003FC5049644
3 changed files with 45 additions and 42 deletions

View file

@ -36,6 +36,12 @@ export default function LabeledInput({
value || defaultValue || '',
);
React.useEffect(() => {
if (value !== undefined) {
setInputValue(value);
}
}, [value]);
const handleInputChange = (e: React.ChangeEvent<HTMLInputElement>) => {
setInputValue(e.target.value);
if (rest.onChange) {