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
When using a container such as a ButtonsGroup, the DisableUtil is used to query FOCUSABLE_ELEMENTS children and disable/enable.
However, if disabling the container component multiple times, it puts the children in a state where they have to be enabled twice before they actually enable.
Scenario:
ButtonsGroup containing 2 buttons
call .disable() on the group. call enable() on the group. All is fine
call .disable() on the group. call disable() on the group again. call enable() on the group; buttons are not enabled. call enable() again on the group and then the buttons are enabled
This behavior is due to the logic in the DisableUtil.disableChild method. Calling disable on a parent will double disable the children. On the first time disabling, it adds the “disabled” attribute and "disabled" css class to the children. The second time, if child.isDisabled() it adds the dui-disabled attribute.
When enabling, it sees the dui-disabled attribute and removes it; but doesn’t remove the ‘disabled’ attribute and ‘disabled’ css class.
For a workaround, I'm having to double up on my enable/disable calls on the parent container component. This ensures that the children disable state is handled correctly.
When using a container such as a
ButtonsGroup
, the DisableUtil is used to queryFOCUSABLE_ELEMENTS
children and disable/enable.However, if disabling the container component multiple times, it puts the children in a state where they have to be enabled twice before they actually enable.
Scenario:
ButtonsGroup containing 2 buttons
This behavior is due to the logic in the
DisableUtil.disableChild
method. Calling disable on a parent will double disable the children. On the first time disabling, it adds the “disabled” attribute and "disabled" css class to the children. The second time, if child.isDisabled() it adds the dui-disabled attribute.When enabling, it sees the dui-disabled attribute and removes it; but doesn’t remove the ‘disabled’ attribute and ‘disabled’ css class.
For a workaround, I'm having to double up on my enable/disable calls on the parent container component. This ensures that the children disable state is handled correctly.
The text was updated successfully, but these errors were encountered: