Posted 8 November 2021, 5:07 am EST
How does one create a custom side panel that can be shown/hidden via button or programmatically
What I did so far are the following
- Create a button that will show the side panel by adding an entry to config.commandMap
- Registered a template that contains the UI element of the panel
- added an entry in config.sidePanels referencing the registered template via uiTemplate and also referencing the commandMap entry via command property. Set showCloseButton and, allowResize to true
So far what I have is a side panel that shows up right away. Clicking the x button does not hide the side panel. The panel is also not resizable. I also noticed that the commandMap.execute callback function is ran when clicking the command button or making changes to any field in the side panel.
I tried adding visibleContext to the template and control it via setData() but it does not work to hide/show the side panel.