Merge pull request #407 from Malte-D/bugfix/bool-input

fixed boolean custom input bug #398
This commit is contained in:
Malte Delfs 2021-08-03 12:49:05 +02:00 committed by GitHub
commit a99e709caa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -65,7 +65,7 @@ export default function Book(props: any): JSX.Element {
const data = event.target["custom_" + input.id]; const data = event.target["custom_" + input.id];
if (data) { if (data) {
if (input.type === EventTypeCustomInputType.Bool) { if (input.type === EventTypeCustomInputType.Bool) {
return input.label + "\n" + (data.value ? "Yes" : "No"); return input.label + "\n" + (data.checked ? "Yes" : "No");
} else { } else {
return input.label + "\n" + data.value; return input.label + "\n" + data.value;
} }