There is no such option as change the prev and next button label in the documentation, and when i try to use string replacement or change the button innerHTML via Javascript, it doesn't work, is there any way that I can safely change the label?
Asked
Active
Viewed 817 times
1 Answers
1
You can use the language config (added since v1.5.0) to customize this:
new Grid({
columns: ['Name', 'Email', 'Title'],
sort: true,
search: true,
pagination: {
limit: 5
},
data: Array(50).fill().map(x => [
faker.name.findName(),
faker.internet.email(),
faker.name.title(),
]),
language: {
'search': {
'placeholder': ' Search...'
},
'pagination': {
'previous': '⬅️',
'next': '➡️',
'showing': ' Displaying'
}
}
});
Also see this example: https://gridjs.io/docs/examples/i18n/

Afshin Mehrabani
- 33,262
- 29
- 136
- 201