Releases: reachweb/statamic-livewire-filters
v2.3.2
Fixed a few issues regarding query scopes:
- You can now apply more than one query scope at a time. (before the key would have been overridden)
- You can preset a query scope in the
LivewireCollection
tag and another one in the URL and they will both be correctly preset. - The
Multiselect
can now apply for more than one field (previously it only applied randomly for the first). - The Resrv query scope is now recognized so that it doesn't try to implode the search array.
If you are not using query scopes or Resrv you can safely skip this release.
v2.3.1
- Fixed an issue that was caused by the
LivewireCollection
component responding too slowly when adding filter params. - Removed the
command
property from thefilters-updated
event and cleaned up the code. - Fixed removing a filter from the
LfTags
component when theselected
value was an array.
v2.3.0
New filter: Dual Range Filter
A brand new custom build Livewire component that uses a slider to let the user filter entries that fall into the specified values range.
More information and documentation: https://livewirefilters.com/docs/v1/dual-range-filter
- Fix: The LfRangeFilter was causing double rendering of the LivewireCollection component (#20). This is now fixed and the
default
property is deprecated. (you can set a default value in the LivewireCollection component itself)
v2.2.0
New feature: Custom URL Query String
Statamic Livewire Filters can now generate easy to read, SEO-friendly URLs when the user is using the filtering system.
Read the docs: https://livewirefilters.com/docs/v1/url-query-string#content-using-livewires-url-query-parameters
Live demo: https://livewirefilters.com/docs/v1/advanced-example/search/brand/citroen,toyota,vw/categories/crossover-suv/transmission/automaticTransmission
v2.1.0
- New Feature: Filter options are now sortable. For more information, see the documentation on sorting filter values.
- Documentation: Added a "Common Issues" page to the docs cover common misconfigurations and other issues.
v2.0.1
- Fixed getting the correct options for array based fields since Statamic changed the way they are saved in statamic/cms#10467
v2.0.0
v1.8.1
- FIX Added some filtering to the
LfTags
Livewire component so that it ignores parameters that don't contain the:
character and are probably not filter conditions. - FIX The
LfTags
component now ignores completely fields not in thefields
property. This approach is better as before it would display filtering you might have been doing using the tag but do not offer to the user to adjust.
v1.8.0
IMPORTANT The URL for the documentation and examples is now https://livewirefilters.com
- NEW
LfTags
component that allows you to display a "tags" or "pills" section of available tags. Read more. - NEW Added a
{{ pagination_total }}
variable that allows you to show the total number of entries when using pagination. Read more. - FIX Overriding the filter options by providing an array of
'value' => 'label'
arrays is fixed. This feature is still undocumented.
v1.7.0
- NEW Add support for Hooks.
Statamic v4.50.0 added support for hooks, allowing you to "hook" into theCollection
tag to perform an action into theEntries
data. This version adds a hook calledlivewire-fetched-entries
for Livewire Filters.
How to use
In your AppServiceProvider
you can register a hook like so:
\Reach\StatamicLivewireFilters\Http\Livewire\LivewireCollection::hook('livewire-fetched-entries',
function ($entries, $next) {
// The parameters of the component if you need them
$params = $this->params;
$entries->each(function ($entry) {
// Do something with the data here
});
return $next($entries);
}
);
For example you might call an API and attach extra data to the entries, or you might want to display some data only if a specific filter is active. The sky is the limit!
You need to be at least on Statamic v.4.50.0 to use this release, if you cannot upgrade at the moment you can stay at v1.6.0 of this addon.