Search code examples
javascriptreactjsmaterial-uimaterial-table

Change default Text Material-table


I am using Material-table ( https://material-table.com/#/ ) in a project, I am trying to change the default texts such as search, rows .. Here's a picture of what my table looks like. enter image description here


Solution

  • If you take a look at the docs you have a property called localization which receives an object with all localization settings.

    e.g.

    If you want to change the search bar placeholde, you need to pass localization.toolbar.searchPlaceholder to change the search placeholder.

    <MaterialTable
      localization={{
          toolbar: {
              searchPlaceholder: 'your string'
          }
      }}
      ...
    />