Closed sillvva closed 1 year ago
Great idea. I will think about it. Feel free to create a PR if you have time.
Maybe this is the solution:
if (info?.booleans?.includes(templateName)) {
return value !== 'false' && value !== '0';
}
I haven't taken the time to study the code yet, but that looks good to me.
Will add it later
One issue I ran into was that the decode function doesn't parse
"true"
or"false"
strings to their corresponding boolean values. Both just result intrue
. To getfalse
, you need to exclude the field from the form data altogether.I think this could be an area for improvement.
"false"
,"0"
"false"
,"0"
, excluded