Search code examples
reactjshtml-tablematerial-uimaterial-table

How do i override the tooltip of the default action button in Material Table?


I am using material-table for their table. In their editable example, there is the Add action button but i would like to override and rename the tooltip from "add" to "add something else".

enter image description here

I have looked at another similar stack overflow question -> How can I override the Actions buttons of Material-Table of react. However, the solution that they proposed replaced the default add button completely. What I wanted is to retain the functionality of the default add row button and just change the naming of the tooltip.


Solution

  • You can simply change the localization like this:

     localization={{
            body: {
              addTooltip: 'Add something else',
           }
    }}