Replace SideBar Widgets onClick with a custom action

Say, for example, I want to alert(‘Hello World’) when I click on the File Explorer tab on the leftSideBar in addition to preventing the file tree content from expanding. Basically, it has to be collapsed at all times and only alert when I click on it. How do I disable this toggle behavior and perform this custom action instead?

[original thread by rhendricks]


@anton-kosyakov @vince-fugnitto guidance appreciated. Thanks!

I don’t know. You will need a custom extension which install a listener on the side bar toolbar. Probably by customizing one of toolbar renderer. You will need to debug to figure out how it works and what should be customized. sorry, i don’t have a ready solution