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
This feature is currently in beta, and use in production is not recommended.
8
+
9
+
### Usage
10
+
This allows you to use a child/nested Livewire Component in place of the existing Filters, giving you more control over the look/feel/behaviour of a filter. This version supports use of returning an array of values for use in filtering.
11
+
12
+
To use a LivewireComponentArrayFilter, you must include it in your namespace:
13
+
```php
14
+
use Rappasoft\LaravelLivewireTables\Views\Filters\LivewireComponentArrayFilter;
15
+
```
16
+
17
+
When creating a filter:
18
+
- Specify a unique name
19
+
- Set the path to a valid Livewire Component
20
+
- Define a filter() callback to define how the returned value will be used.
Copy file name to clipboardExpand all lines: docs/filters/available-component-methods.md
+2-128Lines changed: 2 additions & 128 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -85,135 +85,9 @@ public function configure(): void
85
85
86
86
---
87
87
88
-
## setFilterPillsStatus
88
+
## Pills
89
89
90
-
**Enabled by default**, show/hide the filter pills.
91
-
92
-
```php
93
-
public function configure(): void
94
-
{
95
-
$this->setFilterPillsStatus(true);
96
-
$this->setFilterPillsStatus(false);
97
-
}
98
-
```
99
-
100
-
## setFilterPillsEnabled
101
-
102
-
Show the filter pills for the component.
103
-
104
-
```php
105
-
public function configure(): void
106
-
{
107
-
// Shorthand for $this->setFilterPillsStatus(true)
108
-
$this->setFilterPillsEnabled();
109
-
}
110
-
```
111
-
112
-
## setFilterPillsDisabled
113
-
114
-
Hide the filter pills for the component.
115
-
116
-
```php
117
-
public function configure(): void
118
-
{
119
-
// Shorthand for $this->setFilterPillsStatus(false)
120
-
$this->setFilterPillsDisabled();
121
-
}
122
-
```
123
-
124
-
## setFilterPillsItemAttributes
125
-
Allows for customisation of the appearance of the "Filter Pills Item"
126
-
127
-
Note that this utilises a refreshed approach for attributes, and allows for appending to, or replacing the styles and colors independently, via the below methods.
128
-
129
-
#### default-colors
130
-
Setting to false will disable the default colors for the Filter Pills Item, the default colors are:
'class' => 'bg-rose-300 text-rose-800 dark:bg-indigo-200 dark:text-indigo-900', // Add these classes to the filter pills item
150
-
'default-colors' => false, // Do not output the default colors
151
-
'default-styling' => true // Output the default styling
152
-
]);
153
-
}
154
-
```
155
-
156
-
## setFilterPillsResetFilterButtonAttributes
157
-
Allows for customisation of the appearance of the "Filter Pills Reset Filter Button"
158
-
159
-
Note that this utilises a refreshed approach for attributes, and allows for appending to, or replacing the styles and colors independently, via the below methods.
160
-
161
-
#### default-colors
162
-
Setting to false will disable the default colors for the Filter Pills Reset Filter Button, the default colors are:
'class' => 'text-rose-400 hover:bg-rose-200 hover:text-rose-500 focus:bg-rose-500', // Add these classes to the filter pills reset filter button
180
-
'default-colors' => false, // Do not output the default colors
181
-
'default-styling' => true // Output the default styling
182
-
]);
183
-
}
184
-
```
185
-
186
-
## setFilterPillsResetAllButtonAttributes
187
-
Allows for customisation of the appearance of the "Filter Pills Reset All Button"
188
-
189
-
Note that this utilises a refreshed approach for attributes, and allows for appending to, or replacing the styles and colors independently, via the below methods.
190
-
191
-
#### default-colors
192
-
Setting to false will disable the default colors for the Filter Pills Reset All Button, the default colors are:
0 commit comments