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
so; if this just got fixed so that the children were clickable/turned the button on and off that would be ideal,
but putting the onclick handler in the containing div causes problems (other checkboxes/buttons didn't work properly).
so the solution is to make a new component that takes:
an array of string values, (all the different values for each button),
the 'name' for all the buttons (all radio buttons in a set must have the same 'name')
orientation ('row' or 'column') (the button and label will be in a row; but should each 'button/label' component be in a row or a column)
onClick function. it gets called with the value of the button when (one of the values in the string array), when a button is clicked.
and have it just work.
since it'll be a new component, it won't affect the other places that use ToggleButton.
and eventually fix togglebutton so the label is clickable.
don't worry about disabling for now, because we don't need that. anything else that is needed can be added later as we need it.
for example, to use toggles, the code is pretty complex:; this is one radio button.
fixing radio buttons:
we need a real radio button component, that works with our stylings. right now creating a radio button component is really complicated.
the first problem is that clicking on the label associated with a toggle (or a radio button) doesn't click the button
this is because our toggle button has an onclick on it that overrides the native implemetation.
and the 'label' in the Toggle is the rendering of the 'button'. (the native input doesn't show)
and so the 'children' of the toggle (the actual label) isn't clickable.
here's the code for toggle buttons:
so; if this just got fixed so that the children were clickable/turned the button on and off that would be ideal,
but putting the onclick handler in the containing div causes problems (other checkboxes/buttons didn't work properly).
so the solution is to make a new component that takes:
an array of string values, (all the different values for each button),
the 'name' for all the buttons (all radio buttons in a set must have the same 'name')
orientation ('row' or 'column') (the button and label will be in a row; but should each 'button/label' component be in a row or a column)
onClick function. it gets called with the value of the button when (one of the values in the string array), when a button is clicked.
and have it just work.
since it'll be a new component, it won't affect the other places that use ToggleButton.
and eventually fix togglebutton so the label is clickable.
don't worry about disabling for now, because we don't need that. anything else that is needed can be added later as we need it.
for example, to use toggles, the code is pretty complex:; this is one radio button.
The text was updated successfully, but these errors were encountered: