Hiimdjango
Hiimdjango

Reputation: 620

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

Upvotes: 1

Views: 1221

Answers (1)

Vencovsky
Vencovsky

Reputation: 31595

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'
      }
  }}
  ...
/>

Upvotes: 3

Related Questions