We have updated Flexmonster Software License Agreement, effective as of September 30, 2024. Learn more about what’s changed.

Problem while customize toolbar with angular 8

Answered
Vaibhav mali asked on January 28, 2022

I am using
Flexmonster constructor and pivot container to it all set I want to customize toolbar to remove some icon buttons but is displays below error please help 
beforetoolbarcreated:this.customizeToolbar
 
error message
expected call-signature: 'customizeToolbar' to have a typedef

Attachments:
Capture.PNG

1 answer

Public
Nadia Khodakivska Nadia Khodakivska Flexmonster January 31, 2022

Hello, Vaibhav,
 
Thank you for reaching out to us.
 
Kindly check our sample project on GitHub illustrating the Toolbar customization with Angular: https://github.com/flexmonster/pivot-angular/tree/master/src/app/examples/customizing-toolbar
Here's a code sample of removing the Open Tab from the toolbar:

customizeToolbar(toolbar: Flexmonster.Toolbar) {
        let tabs = toolbar.getTabs();
        toolbar.getTabs = () => {
            tabs = tabs.filter(tab => tab.id != "fm-tab-open");
            return tabs;
        };
    }

 
Please let us know if it works for you. Feel free to contact us if other questions arise.
 
Kind regards,
Nadia

Please login or Register to Submit Answer