Skip to content
This repository was archived by the owner on Jun 27, 2024. It is now read-only.

Commit 5850f24

Browse files
committed
Update README.md
1 parent 6266d14 commit 5850f24

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

README.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
[![Latest Version on Packagist](https://img.shields.io/packagist/v/protonemedia/inertiajs-tables-laravel-query-builder.svg?style=flat-square)](https://packagist.org/packages/protonemedia/inertiajs-tables-laravel-query-builder)
66
[![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](LICENSE.md)
77
![run-tests](https://github.com/protonemedia/inertiajs-tables-laravel-query-builder/workflows/run-tests/badge.svg)
8-
[![Total Downloads on Packagist](https://img.shields.io/packagist/dt/protonemedia/inertiajs-tables-laravel-query-builder.svg?style=flat-square)](https://packagist.org/packages/protonemedia/inertiajs-tables-laravel-query-builder)
98

109
This package provides a *DataTables-like* experience for [Inertia.js](https://inertiajs.com/) with support for searching, filtering, sorting, toggling columns, and pagination. It generates URLs that can be consumed by Spatie's excellent [Laravel Query Builder](https://github.com/spatie/laravel-query-builder) package, with no additional logic needed. The components are styled with [Tailwind CSS 2.0](https://tailwindcss.com/), but it's fully customizable and you can bring your own components. The data refresh logic is based on Inertia's [Ping CRM demo](https://github.com/inertiajs/pingcrm).
1110

@@ -228,6 +227,21 @@ The `filters`, `search`, `columns`, and `on-update` attributes of the `Table` co
228227

229228
When you pass a `meta` object to the table, it will automatically provide a pagination component.
230229

230+
You can override the default pagination translations with the `setTranslations` method of the base component. You can do this in your main JavaScript file:
231+
232+
```js
233+
import Components from "@protonemedia/inertiajs-tables-laravel-query-builder";
234+
235+
Components.Pagination.setTranslations({
236+
no_results_found: "No results found",
237+
previous: "Previous",
238+
next: "Next",
239+
to: "to",
240+
of: "of",
241+
results: "results",
242+
});
243+
```
244+
231245
#### Table.vue slots
232246

233247
The `Table.vue` has several slots that you can use to inject your own implementations.

0 commit comments

Comments
 (0)