Skip to content

Commit 438e311

Browse files
committed
Docs & Tweaks
1 parent f61035b commit 438e311

31 files changed

+236
-234
lines changed

.gitignore

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,5 +29,9 @@ devguide.md
2929
retired.md
3030
*.php.bk
3131
visuals_test.txt
32-
resources/views/components/tbody/tbody.blade copy 2.php
33-
resources/views/components/tbody/tbody.blade copy.php
32+
src/CoreDataTableComponent.php.bk
33+
src/BaseDataTableComponent.php.bk
34+
resources/views/components/tbody/tbody copy 1.blade.php
35+
resources/views/components/tbody/tbody copy 2.blade.php
36+
resources/views/components/tbody/tbody copy 3.blade.php
37+
resources/views/includes/pills-widget copy 1.blade.php

docs/filter-types/filters-boolean.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ For example, your filter may look like this, toggling the filter from true to fa
2424

2525
Many of the standard methods are available, for example
2626
```php
27-
BooleanFilter::make('Limit to Older Enabled Users')
27+
BooleanFilter::make('Limit to Users Over 60')
2828
->filter(function (Builder $builder, bool $enabled) {
2929
if ($enabled)
3030
{
@@ -36,4 +36,11 @@ Many of the standard methods are available, for example
3636
false => 'Inactive',
3737
])
3838
->setFilterDefaultValue(true)
39-
```
39+
```
40+
41+
## Additional Information
42+
Ensure you check out:
43+
- [Applying Filters](../filters/applying-filters) documentation for Applying Filters to your query cleanly
44+
- [Available Filter Methods](../filters/available-filter-methods) documentation for more Filter Features
45+
- [Filter Pills](../filters/filter-pills) documentation for help with configuring the pills for a filter
46+
- [Available Component Methods](../filters/available-component-methods) documentation for Table Wide configuration

docs/filter-types/filters-date.md

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,3 +67,51 @@ public function filters(): array
6767
}
6868
```
6969

70+
## Example
71+
This example would return models with a "created_at" prior to the date specified in the Filter, with a maximum date of "today"
72+
```php
73+
public function filters(): array
74+
{
75+
return [
76+
DateFilter::make('Item Created Before')
77+
->config([
78+
'min' => '2020-01-01',
79+
'max' => \Carbon\Carbon::now()->format('Y-m-d'),
80+
'pillFormat' => 'd M Y',
81+
])
82+
->filter(function (Builder $builder, string $value) {
83+
return $builder->whereDate('created_at', '<=', $value);
84+
}),
85+
];
86+
}
87+
```
88+
89+
The default wire behaviour is "live", to ensure quick response, but you are able to swap it to any wire method that you wish, for example, setting it to debounce with a 1000ms delay would look like:
90+
91+
```php
92+
public function filters(): array
93+
{
94+
return [
95+
DateFilter::make('Item Created Before')
96+
->config([
97+
'min' => '2020-01-01',
98+
'max' => \Carbon\Carbon::now()->format('Y-m-d'),
99+
'pillFormat' => 'd M Y',
100+
])
101+
->filter(function (Builder $builder, string $value) {
102+
return $builder->whereDate('created_at', '<=', $value);
103+
})
104+
->setWireDebounce(1000),
105+
];
106+
}
107+
```
108+
See the below "[Available Filter Methods](../filters/available-filter-methods)" for more wire options
109+
110+
111+
112+
## Additional Information
113+
Ensure you check out:
114+
- [Applying Filters](../filters/applying-filters) documentation for Applying Filters to your query cleanly
115+
- [Available Filter Methods](../filters/available-filter-methods) documentation for more Filter Features
116+
- [Filter Pills](../filters/filter-pills) documentation for help with configuring the pills for a filter
117+
- [Available Component Methods](../filters/available-component-methods) documentation for Table Wide configuration

docs/filter-types/filters-daterange.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,4 +195,13 @@ You can also add locales using the Flatpickr CDN, ensuring that these are loaded
195195
For example to add German (de), ensure that the following is in the "head" section of your layout, ideally before your app.js
196196
```html
197197
<script src="https://npmcdn.com/flatpickr/dist/l10n/de.js" defer></script>
198-
```
198+
```
199+
200+
201+
202+
## Additional Information
203+
Ensure you check out:
204+
- [Applying Filters](../filters/applying-filters) documentation for Applying Filters to your query cleanly
205+
- [Available Filter Methods](../filters/available-filter-methods) documentation for more Filter Features
206+
- [Filter Pills](../filters/filter-pills) documentation for help with configuring the pills for a filter
207+
- [Available Component Methods](../filters/available-component-methods) documentation for Table Wide configuration

docs/filter-types/filters-datetime.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,3 +68,10 @@ public function filters(): array
6868
}
6969
```
7070

71+
72+
## Additional Information
73+
Ensure you check out:
74+
- [Applying Filters](../filters/applying-filters) documentation for Applying Filters to your query cleanly
75+
- [Available Filter Methods](../filters/available-filter-methods) documentation for more Filter Features
76+
- [Filter Pills](../filters/filter-pills) documentation for help with configuring the pills for a filter
77+
- [Available Component Methods](../filters/available-component-methods) documentation for Table Wide configuration

docs/filter-types/filters-livewire-component-array.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,3 +49,9 @@ As this is an array, you can define the separator to use between pills values, b
4949
}
5050
```
5151

52+
## Additional Information
53+
Ensure you check out:
54+
- [Applying Filters](../filters/applying-filters) documentation for Applying Filters to your query cleanly
55+
- [Available Filter Methods](../filters/available-filter-methods) documentation for more Filter Features
56+
- [Filter Pills](../filters/filter-pills) documentation for help with configuring the pills for a filter
57+
- [Available Component Methods](../filters/available-component-methods) documentation for Table Wide configuration

docs/filter-types/filters-livewire-component.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,4 +97,12 @@ An example "my-test-external-filter.blade.php" is given below:
9797
```
9898

9999
### Important Notes For The livewire-component-filter.blade.php
100-
- It is **strongly** recommmended not to publish, nor update this file, while this feature is in beta, as it is subject to change at short notice, which may lead to breaking changes.
100+
- It is **strongly** recommmended not to publish, nor update this file, while this feature is in beta, as it is subject to change at short notice, which may lead to breaking changes.
101+
102+
103+
## Additional Information
104+
Ensure you check out:
105+
- [Applying Filters](../filters/applying-filters) documentation for Applying Filters to your query cleanly
106+
- [Available Filter Methods](../filters/available-filter-methods) documentation for more Filter Features
107+
- [Filter Pills](../filters/filter-pills) documentation for help with configuring the pills for a filter
108+
- [Available Component Methods](../filters/available-component-methods) documentation for Table Wide configuration

docs/filter-types/filters-multiselect-dropdown.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,4 +46,12 @@ public function filters(): array
4646
];
4747
}
4848

49-
```
49+
```
50+
51+
52+
## Additional Information
53+
Ensure you check out:
54+
- [Applying Filters](../filters/applying-filters) documentation for Applying Filters to your query cleanly
55+
- [Available Filter Methods](../filters/available-filter-methods) documentation for more Filter Features
56+
- [Filter Pills](../filters/filter-pills) documentation for help with configuring the pills for a filter
57+
- [Available Component Methods](../filters/available-component-methods) documentation for Table Wide configuration

docs/filter-types/filters-multiselect.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,4 +45,12 @@ public function filters(): array
4545
];
4646
}
4747

48-
```
48+
```
49+
50+
51+
## Additional Information
52+
Ensure you check out:
53+
- [Applying Filters](../filters/applying-filters) documentation for Applying Filters to your query cleanly
54+
- [Available Filter Methods](../filters/available-filter-methods) documentation for more Filter Features
55+
- [Filter Pills](../filters/filter-pills) documentation for help with configuring the pills for a filter
56+
- [Available Component Methods](../filters/available-component-methods) documentation for Table Wide configuration

docs/filter-types/filters-number-range.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,3 +36,10 @@ The default values should be set in the options() method.
3636
You may also specify a minimum and maximum range in the config() options, and should you wish to use real values instead of a percentage.
3737
You can change the "suffix" to a metric of your choosing.
3838
You can change the "prefix" to an item of your choosing (e.g $/£/€)
39+
40+
## Additional Information
41+
Ensure you check out:
42+
- [Applying Filters](../filters/applying-filters) documentation for Applying Filters to your query cleanly
43+
- [Available Filter Methods](../filters/available-filter-methods) documentation for more Filter Features
44+
- [Filter Pills](../filters/filter-pills) documentation for help with configuring the pills for a filter
45+
- [Available Component Methods](../filters/available-component-methods) documentation for Table Wide configuration

0 commit comments

Comments
 (0)