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

Issue with Toolbar Customization in Flexmonster (

Answered
balkan asked on December 24, 2023

Hello Flexmonster Support Team,
I hope this message finds you well. I am currently working on a project that involves customizing the toolbar using the `getTabs()` method, as suggested in your documentation.
While implementing the desired changes, I encountered an issue. After removing the objects between two dividers, I noticed that two strange divider elements are still present in the toolbar. Attempting to remove them resulted in an error, specifically: "Property 'divider' does not exist on type 'ToolbarTab'.ts(2339)."

(using "ngx-flexmonster": "2.9.65" btw),

Upon inspecting the objects returned by the `getTabs()` method, I observed that the dividers are defined as objects with the property `{ divider: true }`. However, attempting to filter out these objects leads to the mentioned TypeScript error.
Could you please provide guidance on how to properly filter out or handle these divider objects in the toolbar customization? Your assistance in resolving this matter would be highly appreciated.
Thank you in advance for your support.
Best regards,

3 answers

Public
Solomiia Andrusiv Solomiia Andrusiv Flexmonster December 25, 2023

Hello, Balkan!
 
Hope you are doing well.
 
Kindly note that it is possible to filter the divider tabs by checking if the divider property exists in the tab. For example, you can use the Object.prototype.hasOwnProperty() method or check if tab["divider"] is not undefined.
We have prepared a JSFiddle sample for illustration: https://jsfiddle.net/flexmonster/4evfcu9b/.
 
Hope it helps.
Feel free to contact us in case of any other questions.
 
Kind regards,
Solomiia

Public
Solomiia Andrusiv Solomiia Andrusiv Flexmonster January 9, 2024

Hello, Balkan!
 
Hope you are doing well.
 
We are glad to inform you that the divider property was added to the ToolbarTab interface. With this fix, it is possible to filter out the divider tabs by specifying the mentioned property.
 
The fix is available in the 2.9.68 version of Flexmonster: https://www.flexmonster.com/release-notes/version-2-9-68/.
You are welcome to update the component: https://www.flexmonster.com/doc/updating-to-the-latest-version/.
 
Please let us know if everything works well for you.
 
Kind regards,
Solomiia

Public
Solomiia Andrusiv Solomiia Andrusiv Flexmonster January 16, 2024

Hello, Balkan!

Hope you are having a great week.

Just checking in to ask if you had some time to check out our previous messages. Could you please let us know if updating or using the suggested workaround was helpful?

Looking forward to hearing your feedback.

Kind regards,
Solomiia

Please login or Register to Submit Answer