Add an icon to a custom toolbar element

Hi, I'd added a custom element (Show inactive) with a custom action and I need to add a custom icon, how can I do that?

Thanks

const toolbarOptions = ['ColumnChooser','Search','PdfExport','ExcelExport','Show inactive'];

4 Replies

PS Pavithra Subramaniyam Syncfusion Team June 1, 2023 03:54 AM UTC

Hi Pol Maresma,


Greetings from Syncfusion support.


You can achieve your requirement by defining the custom toolbar item as in the below code example.


const toolbarOptions = ['ColumnChooser''Search''PdfExport''ExcelExport',

                        { text: 'Show inactive', tooltipText: 'Show inactive'prefixIcon: 'e-customicon',

                                  id: 'ShowInactive' }

]

 


https://ej2.syncfusion.com/react/documentation/grid/tool-bar/tool-bar-items#both-built-in-and-custom-items-in-toolbar


Please get back to us if you need further assistance on this.


Regards,

Pavithra S



JD Jack Dunn June 1, 2023 06:21 AM UTC



PM Pol Maresma June 1, 2023 07:47 AM UTC

Great thank you!



SG Suganya Gopinath Syncfusion Team June 5, 2023 07:09 AM UTC

We hope the provided information helped to solve the issue. Please get back to us for further assistance. 


Loader.
Up arrow icon