How to sidebar item icons in popup?

When the sidebar is collapsed,
the sub-items appear in a popup, and in that case they lose there icon.

Is there an easy way to make them displayed as they are when the sidebar isn’t collapsed ?

I’ve would expected something like this to override popup list items template but it doesn’t work:

{
   "view": "sidebar",
   "data": [...],
   "popup": {
        template: (obj) => `<span class='webix_icon ${obj.icon}'></span> ${obj.value}`
    }
}

I’ve actually found the following solution, but it is a little bit hacky.
Snippet : Code Snippet

// After sidebar initialization
$$('$sidebar1').getPopup().getBody().getChildViews()[1].define(
  'template', 
  (obj) => `<span class='webix_icon ${obj.icon}'></span> ${obj.value}`
);
// need to fix the css for the icon not to be aligned right
 <style>
  .webix_sidebar_popup_list.webix_sidebar_popup_left .webix_icon {
    float: none;
    line-height: 1;
    width: 20px;
  }
</style>

Hello Fabien,

We are agree that this way of displaying icons a bit hacky and we need to make this more convenient but for now this is the only way of preserving them as the are. We will fix it in the future.