You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The checkbox group widget will control a number of dojo checkboxes allowing them to behave like native html check boxes.
This would mean setting the same name property of each of the child checkboxes and controlling the checked property of each. Setting the name and value properties of the checkboxes is very important to make this work.
The checkboxes should probably be wrapped in a fieldset and the group widget should accept a label property that gets used as a legend for the fieldset.
There are several ways we might approach this:
middleware
A checkbox group middleware could be used for a functional widget approach. The middleware could provide a getter and setter for the checkbox group value. This would then be used to set the checked status of the widgets.
A render prop could be used to render the child checkboxes. It would make an onValueChange property available to the child checkboxes which they could use to report back their value on change.
The checkbox group widget could take checkbox widgets as it's children. These could then be auto wired up to the get and set value functions of the group.
The checkbox group widget could export a factory function that's used to create the child checkboxes. This would restrict access to the check box properties and give the parent group access to the created widget onValue callbacks.
The checkbox group widget will control a number of dojo checkboxes allowing them to behave like native html check boxes.
This would mean setting the same
name
property of each of the child checkboxes and controlling thechecked
property of each. Setting thename
andvalue
properties of the checkboxes is very important to make this work.The checkboxes should probably be wrapped in a
fieldset
and the group widget should accept alabel
property that gets used as alegend
for thefieldset
.There are several ways we might approach this:
middleware
A checkbox group middleware could be used for a functional widget approach. The middleware could provide a getter and setter for the checkbox group value. This would then be used to set the checked status of the widgets.
renderprops
A render prop could be used to render the child checkboxes. It would make an
onValueChange
property available to the child checkboxes which they could use to report back their value on change.child checkboxes
The checkbox group widget could take checkbox widgets as it's children. These could then be auto wired up to the get and set value functions of the group.
child checkbox factory functions
The checkbox group widget could export a factory function that's used to create the child checkboxes. This would restrict access to the check box properties and give the parent group access to the created widget
onValue
callbacks.The text was updated successfully, but these errors were encountered: