You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|`resource`| Optional |`string`| - | target resource, e.g. 'posts' |
1240
-
|`label`| Optional |`string`|'ra.action.list'| label or translation message to use |
1240
+
|`label`| Optional |`string`|- | label or translation message to use |
1241
1241
|`icon`| Optional |`ReactElement`| - | iconElement, e.g. `<CommentIcon />`|
1242
1242
|`scrollToTop`| Optional |`boolean`|`true`| Scroll to top after link |
1243
1243
1244
1244
It also supports [all the other `<Button>` props](#button).
1245
1245
1246
+
### `label`
1247
+
1248
+
By default, the label is `List` in English. In other languages, it's the translation of the `'ra.action.list'` key.
1249
+
1250
+
You can customize this label by providing a resource specific translation with the key `resources.RESOURCE.action.list` (e.g. `resources.posts.action.list`):
1251
+
1252
+
```js
1253
+
// in src/i18n/en.js
1254
+
importenglishMessagesfrom'ra-language-english';
1255
+
1256
+
exportconsten= {
1257
+
...englishMessages,
1258
+
resources: {
1259
+
posts: {
1260
+
name:'Post |||| Posts',
1261
+
action: {
1262
+
list:'See all posts'
1263
+
}
1264
+
},
1265
+
},
1266
+
...
1267
+
};
1268
+
```
1269
+
1270
+
You can also customize this label by specifying a custom `label` prop:
1271
+
1272
+
```jsx
1273
+
<ListButton label="Delete this comment"/>
1274
+
```
1275
+
1246
1276
### `scrollToTop`
1247
1277
1248
1278
By default, `<ListButton>` scrolls the page to the top after redirecting. You can disable it as follows:
0 commit comments