Since I'm having limited screen estate I'd like to show / hide some html content depends on pane state, expanded vs usual placement within the dock manager. To be specific I'd like to expose Export to Excel button when pane is expanded and hide it when the pane is 'minimized', see:
Is that possible
Hi,
Thank you for posting to Infragistics Community!
Sure, I can suggest adding a getter that returns whether the target pane is maximized and use it along with the *ngIf directive to conditionally display elements. The IgcContentPane conveniently has such an "isMaximized" property – please refer to the API here.
For your convenience, I created this sample demonstrating a possible approach. Please, check it out and feel free to further modify it so that it best fits your application requirements.
Additionally, I noticed a minor caveat around the changes not getting immediately reflected until subsequent clicks over the component, so you will notice there is a ‘mousedown’ event listener added to the dock manager in whose handler the layout of the dock manager is refreshed.
Lastly, the sample shows this for a regular button, nevertheless, the same could be applied to the `igx-grid-toolbar-exporter` element.
If you require any further assistance on the matter, please, let me know.
Best regards, Bozhidara Pachilova Associate Software Developer
Hi Bozhidara, Thanks a lot for your speedy and insightful answer, much appreciated.I think your solution is a step in right direction but since I have exporter buttons in 6 panes and each exporter is wrapped in it's own component leveraging 'mousedown' event is bit ... noisy/clunky. What I was hoping for instruction to capture maximize click event on each of my pane and then propagate this event further down stream.
I'd rather attach event listener on both maximaze and minimize buttons on each pane which would help me determine the context and react properly.Something like:
document.querySelectorAll('.igx-maximize-button').forEach(button => { //...event handler here });
Hope you understand my point of view.Thanks again.