Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
15
Capturing pane expansion event in Dock Manager
posted

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 

Parents
No Data
Reply
  • 2680
    Offline posted

    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

Children