-
-
Notifications
You must be signed in to change notification settings - Fork 346
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #739 from rappasoft/develop
v2.2.0
- Loading branch information
Showing
19 changed files
with
231 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
--- | ||
title: Events | ||
weight: 2 | ||
--- | ||
|
||
These are the available events on the datatable component that you can fire from your application: | ||
|
||
### refreshDatatable | ||
|
||
```php | ||
$this->emit('refreshDatatable'); | ||
``` | ||
|
||
Calls `$refresh` on the component. Good for updating from external sources or as an alternative to polling. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
--- | ||
title: Adding Custom Markup | ||
weight: 3 | ||
--- | ||
|
||
If you would like to append any custom markup right before the end of the component, you may use the `customView` method and return a view. | ||
|
||
This is good for loading extra content such as modals. | ||
|
||
```php | ||
public function customView(): string | ||
{ | ||
return 'includes.custom'; | ||
} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
--- | ||
title: Debugging | ||
weight: 3 | ||
weight: 4 | ||
--- | ||
|
||
## Configuration | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
@php | ||
$theme = $component->getTheme(); | ||
@endphp | ||
|
||
@if ($theme === 'tailwind') | ||
<div class="rounded-md shadow-sm"> | ||
<input | ||
wire:model.stop="{{ $component->getTableName() }}.filters.{{ $filter->getKey() }}" | ||
wire:key="{{ $component->getTableName() }}-filter-{{ $filter->getKey() }}" | ||
id="{{ $component->getTableName() }}-filter-{{ $filter->getKey() }}" | ||
type="number" | ||
@if($filter->hasConfig('min')) min="{{ $filter->getConfig('min') }}" @endif | ||
@if($filter->hasConfig('max')) max="{{ $filter->getConfig('max') }}" @endif | ||
class="block w-full border-gray-300 rounded-md shadow-sm transition duration-150 ease-in-out focus:border-indigo-300 focus:ring focus:ring-indigo-200 focus:ring-opacity-50 dark:bg-gray-800 dark:text-white dark:border-gray-600" | ||
/> | ||
</div> | ||
@elseif ($theme === 'bootstrap-4' || $theme === 'bootstrap-5') | ||
<div class="mb-3 mb-md-0 input-group"> | ||
<input | ||
wire:model.stop="{{ $component->getTableName() }}.filters.{{ $filter->getKey() }}" | ||
wire:key="{{ $component->getTableName() }}-filter-{{ $filter->getKey() }}" | ||
id="{{ $component->getTableName() }}-filter-{{ $filter->getKey() }}" | ||
type="number" | ||
@if($filter->hasConfig('min')) min="{{ $filter->getConfig('min') }}" @endif | ||
@if($filter->hasConfig('max')) max="{{ $filter->getConfig('max') }}" @endif | ||
class="form-control" | ||
/> | ||
</div> | ||
@endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<?php | ||
|
||
namespace Rappasoft\LaravelLivewireTables\Views\Filters; | ||
|
||
use Rappasoft\LaravelLivewireTables\DataTableComponent; | ||
use Rappasoft\LaravelLivewireTables\Views\Filter; | ||
|
||
class NumberFilter extends Filter | ||
{ | ||
public function validate($value) | ||
{ | ||
return is_numeric($value) ? $value : false; | ||
} | ||
|
||
public function isEmpty($value): bool | ||
{ | ||
return $value === ''; | ||
} | ||
|
||
public function render(DataTableComponent $component) | ||
{ | ||
return view('livewire-tables::components.tools.filters.number', [ | ||
'component' => $component, | ||
'filter' => $this, | ||
]); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters