Skip to content

Commit

Permalink
update documentation for Livewire 3 dispatch (#1700)
Browse files Browse the repository at this point in the history
* update documentation for Livewire 3 dispatch

---------
  • Loading branch information
macbookandrew authored Apr 30, 2024
1 parent e5979d0 commit 020fec4
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions docs/datatable/events.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ These are the available events on the datatable component that you can fire from
### refreshDatatable

```php
$this->emit('refreshDatatable');
$this->dispatch('refreshDatatable');
```

Calls `$refresh` on the component. Good for updating from external sources or as an alternative to polling.
Expand All @@ -18,29 +18,29 @@ Calls `$refresh` on the component. Good for updating from external sources or as
You can have the table sort a specific column:

```php
$this->emit('setSort', 'name', 'asc');
$this->dispatch('setSort', 'name', 'asc');
```

### clearSorts

You can clear all the applied sorts:

```php
$this->emit('clearSorts');
$this->dispatch('clearSorts');
```

### setFilter

You can have the table run a specific filter:

```php
$this->emit('setFilter', 'status', '1');
$this->dispatch('setFilter', 'status', '1');
```

### clearFilters

You can have the table clear all filters:

```php
$this->emit('clearFilters');
```
$this->dispatch('clearFilters');
```

0 comments on commit 020fec4

Please sign in to comment.