Laravel Livewire Tables Documentation

🎉 Enjoying this package? Consider sponsoring me on GitHub or buying me a beer.

This is the documentation for v2 but the latest version is v3. You can switch versions in the menu at the top. Check your current version with the following command:

composer show rappasoft/laravel-livewire-tables

Available Methods

These are the available search configuration methods on the component.


If you need to programmatically set the search for when the component loads:

setSearch

1public function configure(): void
2{
3 $this->setSearch('Laravel');
4}

Search as a whole is enabled by default, but if you ever needed to toggle it you can use the following methods:

setSearchStatus

Enable/disable sorting for the whole component.

1public function configure(): void
2{
3 $this->setSearchStatus(true);
4 $this->setSearchStatus(false);
5}

setSearchEnabled

Enable search for the whole component.

1public function configure(): void
2{
3 // Shorthand for $this->setSearchStatus(true)
4 $this->setSearchEnabled();
5}

Disable search for the whole component.

setSearchDisabled

1public function configure(): void
2{
3 // Shorthand for $this->setSearchStatus(false)
4 $this->setSearchDisabled();
5}

setSearchVisibilityStatus

Show/hide the search box.

1public function configure(): void
2{
3 $this->setSearchVisibilityStatus(true);
4 $this->setSearchVisibilityStatus(false);
5}

setSearchVisibilityEnabled

Show the search box.

1public function configure(): void
2{
3 // Shorthand for $this->setSearchVisibilityStatus(true)
4 $this->setSearchVisibilityEnabled();
5}

setSearchVisibilityDisabled

Hide the search box.

1public function configure(): void
2{
3 // Shorthand for $this->setSearchVisibilityStatus(false)
4 $this->setSearchVisibilityDisabled();
5}

You can only set one of the follow search modifiers:

setSearchDebounce

Set a search debounce in milliseconds on the search box:

1public function configure(): void
2{
3 // Search will wait 1 second before sending request.
4 $this->setSearchDebounce(1000);
5}

setSearchDefer

Tell Livewire to defer the search request until the following request.

1public function configure(): void
2{
3 // Send the search request with the next network request
4 $this->setSearchDefer();
5}

setSearchLazy

Tell Livewire to use the lazy modifier.

1public function configure(): void
2{
3 // Send the request when the user clicks away from the search box.
4 $this->setSearchLazy();
5}