Currently, when clicking a label, nothing happens. Ideally, clicking a label should focus (or activate for checkboxes) the input.
This is done by having the for attribute of the label matching the id attribute of the input.
Rails does that with an all_namespace_snake_cased convention, which is implemented here.
This commit does that, and updates the sample output in the README.
Potential issues / incompatibilities with client configuration if commit is merged after upgrade :
ids of inputs are now overriden by the fields helpers. This could cause issues if a customer expects a certain id on a given input. It might be safer to ignore this new wiring when a custom id is given in props. I can do the change if needed.
Currently, when clicking a
label
, nothing happens. Ideally, clicking alabel
should focus (or activate for checkboxes) theinput
. This is done by having thefor
attribute of thelabel
matching theid
attribute of theinput
. Rails does that with anall_namespace_snake_cased
convention, which is implemented here.This commit does that, and updates the sample output in the README.
Potential issues / incompatibilities with client configuration if commit is merged after upgrade :
ids
ofinputs
are now overriden by thefields
helpers. This could cause issues if a customer expects a certainid
on a giveninput
. It might be safer to ignore this new wiring when a customid
is given inprops
. I can do the change if needed.labels
for
will change.