Hi,
SelectOnClick is true but not working whenthe below code is implemented.
menuItem id matches the name of the image.
My sample code :
sideMenu.addItemSelectListener(new Consumer<SideMenu.ItemSelectEvent>() {
@Override
public void accept(SideMenu.ItemSelectEvent itemSelectEvent) {
itemSelectEvent.getMenuItem().setIcon("branding/" + itemSelectEvent.getMenuItem().getId() + "_one.svg");
if (previousSelectedItem != null) {
previousSelectedItem.setIcon("branding/" + previousSelectedItem.getId() + "_two.svg");
}
previousSelectedItem = itemSelectEvent.getMenuItem();
}
});
Thanks in advance.