Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #103321
    Joko Pitoyo
    Participant

    Any sample howto customize toolbar button?

    #103322

    Hi Joko,

    You can pass a callback function to the onInit property as the toolbar HTML Element is passed as an argument. OnInit belongs to the header property of the grid. When you have the toolbar HTML Element you can select any button you want and customize it.

    Here is a simple example:

    header: {
    visible: true,
    onInit: (toolbar) => {
    const sortButton = toolbar.querySelector(‘div[smart-id=”sortButton”]’);
    sortButton.classList.add(‘custom-button’);
    }
    },

    Best regards,

    Svetoslav Borislavov

    Smart UI Team

    https://www.htmlelements.com

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.