Closed gyroid closed 2 months ago
Yes, I did not find it.
No, this error is not related to views.
No
8.2
5.9.0
11.14.0
3.5.2
No response
Tailwind 3.x
Using dynamic filter with WireUI select for many-to-many relations I have the error:
"count(): Argument #1 ($value) must be of type Countable|array, null given"
when the filter is first time selected.
I fixed this bug changing the code.
In \PowerComponents\LivewirePowerGrid\Components\Filters\Builders\WithMultiSelectBuilder in line 25 instead of
if (count($values) === 0) { return; }
should be:
if (!is_countable($values) || count($values) === 0) { return; }
First click on "FOO" then....
<?php //...
Have you searched through other issues to see if your problem is already reported or has been fixed?
Yes, I did not find it.
Did you read the documentation?
Yes, I did not find it.
Have you tried to publish the views?
No, this error is not related to views.
Is there an error in the console?
No
PHP Version
8.2
PowerGrid
5.9.0
Laravel
11.14.0
Livewire
3.5.2
Alpine JS
No response
Theme
Tailwind 3.x
Describe the bug.
Using dynamic filter with WireUI select for many-to-many relations I have the error:
"count(): Argument #1 ($value) must be of type Countable|array, null given"
when the filter is first time selected.
I fixed this bug changing the code.
In \PowerComponents\LivewirePowerGrid\Components\Filters\Builders\WithMultiSelectBuilder in line 25 instead of
if (count($values) === 0) { return; }
should be:
if (!is_countable($values) || count($values) === 0) { return; }
To Reproduce...
First click on "FOO" then....
Extra information