rappasoft / laravel-livewire-tables

A dynamic table component for Laravel Livewire
https://rappasoft.com/docs/laravel-livewire-tables/v2/introduction
MIT License
1.7k stars 320 forks source link

Add-setDefaultPerPage Method #1671

Closed lrljoe closed 4 months ago

lrljoe commented 4 months ago

This adds to the pagination methods available. Presently setPerPage is used for setting the per-page value Therefore using it in configure() or similar will over-ride anything defined via the querystring or session

To rectify this, setDefaultPerPage is being added, to be used to set a default per-page value, which will only be used if perPage is the default (10) value, otherwise it will respect what is currently set (e.g. via the session/querystring)

All Submissions:

New Feature Submissions:

  1. [X] Does your submission pass tests and did you add any new tests needed for your feature?
  2. [X] Did you update all templates (if applicable)?
  3. [X] Did you add the relevant documentation (if applicable)?
  4. [X] Did you test locally to make sure your feature works as intended?

Changes to Core Features:

codecov[bot] commented 4 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 88.14%. Comparing base (52dac06) to head (0174d79).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## develop #1671 +/- ## ============================================= + Coverage 88.12% 88.14% +0.01% - Complexity 1310 1312 +2 ============================================= Files 123 123 Lines 3100 3105 +5 ============================================= + Hits 2732 2737 +5 Misses 368 368 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.