Closed HeadStudios closed 1 year ago
The store is namespaced you should do it like this:
this.$store.commit(`${ this.resourceName }/updateFilterState`, {
filterClass: this.filterKey,
value: this.range,
});
I have also done a slider filter package if you are interested, perhaps it does exactly what you need: https://github.com/dcasia/nova-slider-filter
The store is namespaced you should do it like this:
this.$store.commit(`${ this.resourceName }/updateFilterState`, { filterClass: this.filterKey, value: this.range, });
I have also done a slider filter package if you are interested, perhaps it does exactly what you need: https://github.com/dcasia/nova-slider-filter
Thank you - this has fixed my problem. Appreciated so much - and closing issue now. Cheers
Laravel Version: 9 Nova Version: 4.25.1 PHP Version: 8.2 Database Driver & Version: MySQL Operating System and Version: Macbook Browser type and version: Chrome latest Reproduction Repository: https://github.com/HeadStudios/novaissue-5456-nonova
Description:
I'm trying to create a custom filter for Nova using a Vue 3 range slider. The filter is intended to filter records based on a related model's timezone column. However, when I use the filter, I encounter a Vuex error: [vuex] unknown mutation type: updateFilterState.
Detailed steps to reproduce the issue on a fresh Nova installation:
Created a custom filter using the nova:custom-filter Artisan command. Integrated @vueform/slider for Vue 3 as the range slider. Set up the filter to commit the updateFilterState mutation on slider change.
Error: https://p147.p4.n0.cdn.getcloudapp.com/items/7KuX8JKr/6c900876-24f5-4dd6-b52f-90f6372de456.png?v=3de3359831f02feb3fa63b0bf1b2dfc8
Thank you!