You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+8Lines changed: 8 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,6 +2,14 @@
2
2
3
3
All notable changes to `laravel-livewire-tables` will be documented in this file
4
4
5
+
## [v3.3.4] - 2024-07-27
6
+
### New Features
7
+
- Added capability to setFilterDefaultValue for a DateRangeFilter by @lrljoe in https://github.com/rappasoft/laravel-livewire-tables/pull/1796
8
+
- Add localised pill values for DateFilter, DateTimeFilter, DateRangeFilter by @lrljoe in https://github.com/rappasoft/laravel-livewire-tables/pull/1797
9
+
10
+
### Tweaks
11
+
- Migrating Carbon usage into Trait, Adding Filter/Search Lifecycle Hooks by @lrljoe in https://github.com/rappasoft/laravel-livewire-tables/pull/1798
12
+
5
13
## [v3.3.3] - 2024-07-23
6
14
### New Features
7
15
- Add additional DateRangeFilter options by @lrljoe in https://github.com/rappasoft/laravel-livewire-tables/pull/1793
Copy file name to clipboardExpand all lines: docs/filter-types/filters-date.md
+19-1Lines changed: 19 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -33,6 +33,7 @@ public function filters(): array
33
33
}
34
34
```
35
35
36
+
## setFilterDefaultValue
36
37
Date filters also support the setFilterDefaultValue() method, which must be a valid date in the "Y-m-d" format. This will apply as a default until removed.
37
38
```php
38
39
public function filters(): array
@@ -47,5 +48,22 @@ public function filters(): array
47
48
];
48
49
}
49
50
```
50
-
51
+
52
+
## setPillsLocale
53
+
Date Filters also support the setPillsLocale method, which allows you to set a locale for use in generating the Filter Pills values
54
+
```php
55
+
public function filters(): array
56
+
{
57
+
return [
58
+
DateFilter::make('Verified From')
59
+
->setPillsLocale('fr ') // Use French localisation for the Filter Pills values
60
+
->config([
61
+
'min' => '2020-01-01', // Earliest Acceptable Date
62
+
'max' => '2021-12-31', // Latest Acceptable Date
63
+
'pillFormat' => 'd M Y', // Format for use in Filter Pills
64
+
'placeholder' => 'Enter Date', // A placeholder value
Copy file name to clipboardExpand all lines: docs/filter-types/filters-datetime.md
+19-1Lines changed: 19 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -33,6 +33,7 @@ public function filters(): array
33
33
}
34
34
```
35
35
36
+
## setFilterDefaultValue
36
37
DateTime filters also support the setFilterDefaultValue() method, which must be a valid datetime in the "Y-m-dTH:i" format. This will apply as a default until removed.
37
38
```php
38
39
public function filters(): array
@@ -47,6 +48,23 @@ public function filters(): array
47
48
->setFilterDefaultValue('2023-07-07T06:27')
48
49
];
49
50
}
51
+
```
52
+
53
+
## setPillsLocale
54
+
DateTime Filters also support the setPillsLocale method, which allows you to set a locale for use in generating the Filter Pills values
55
+
```php
56
+
public function filters(): array
57
+
{
58
+
return [
59
+
DateTimeFilter::make('Verified From')
60
+
->setPillsLocale('fr ') // Use French localisation for the Filter Pills values
61
+
->config([
62
+
'min' => '2020-01-01', // Earliest Acceptable Date
63
+
'max' => '2021-12-31', // Latest Acceptable Date
64
+
'pillFormat' => 'd M Y - H:i', // Format for use in Filter Pills
65
+
'placeholder' => 'Enter Date', // A placeholder value
Copy file name to clipboardExpand all lines: docs/misc/lifecycle-hooks.md
+18Lines changed: 18 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -22,6 +22,24 @@ This is called immediately after the Columns are set up
22
22
## rowsRetrieved
23
23
This is called immediately after the query is executed, and is passed the result from the executed query.
24
24
25
+
## searchUpdated
26
+
This is called whenever the search is updated, and is passed the value that has been searched for
27
+
28
+
## filterApplying
29
+
This is called whenever a Filter is applying
30
+
31
+
## filterReset
32
+
This is called whenever a Filter is reset
33
+
34
+
## filterSet
35
+
This is called whenever a Filter is set
36
+
37
+
## filterUpdated
38
+
This is called whenever a Filter is updated/used
39
+
40
+
## filterRemoved
41
+
This is called whenever a Filter is removed from the table
42
+
25
43
## Use in Traits
26
44
To use these in a trait, allowing you to easily set defaults across multiple tables, you should ensure that you append the Lifecycle Hook with your trait name, e.g.
0 commit comments