gwt-material icon indicating copy to clipboard operation
gwt-material copied to clipboard

MaterialCollapsible doesn't set "active" state when expanding/collapsing via mouse

Open gkresic opened this issue 4 years ago • 1 comments

If MaterialCollapsibleItem is expanded via mouse click, its "active" flag is not set, so:

  • MaterialCollapsible.getActive() returns null
  • MaterialCollapsibleItem.isActive() returns false

One possible workaround is to check for existence of "active" CSS class name:

MaterialCollapsibleItem.getElement().hasClassName(CssName.ACTIVE)

OTOH, if item is expanded in code via MaterialCollapsible.setActive(int) then active attribute is correctly set both on MaterialCollapsible and MaterialCollapsibleItem.

gkresic avatar Mar 25 '20 16:03 gkresic

Cool nice catch, will be updating and will patch to 2.3.1-SNAPSHOT

kevzlou7979 avatar Mar 26 '20 01:03 kevzlou7979