Closed nathan-io closed 8 months ago
Thanks for raising the bug.
Just as a test, could you please try the following:
public function mount($filters = [])
{
foreach ($filters as $key => $value) {
$this->appliedFilters[$key ] = $this->filterComponents[$key ] = $value;
}
}
Thanks for the fast response! That fixes it.
Great, I'll update the setFilter() method to update both to save you having to update a ton of tables.
Expect that to be in beta.8 (tomorrow)
PR #1449 <- for reference
Fix should be in v3.0.0-beta.8, please re-open and let me know if something is broken!
Getting the same result with beta8. Tried both versions:
$this->setFilter($key, $value);
$this->appliedFilters[$key] = $this->filterComponents[$key] = $value;
Also tried just removing that block.
It looks like beta9 is out, but for some reason composer update keeps beta8.
I got beta9 installed and that fixes it, sorry for any confusion. Everything is working perfectly using
$this->setFilter($key, $value);
What happened?
We're passing an array
$filters
to the component from our view, then setting those filters like so:This works in v2, but in v3-beta4 the filters aren't applied when the table is loaded.
We can apply them manually via the filter UI, that works fine.
How to reproduce the bug
No response
Package Version
3.0.0-beta4
PHP Version
8.1.x
Laravel Version
10.x
Alpine Version
No response
Theme
Tailwind 3.x
Notes
No response
Error Message
No response