Closed asugai closed 2 months ago
Seemed to have missed this over the holidays! Happy with a PR that resolves this 😄
Hey, do you still need PR for that? I can try to do it.
Sure!
I already found that workaround for that is not to use "0" as value of enum. eg. const Admin = 0;
.
UPDATE:
For me it's rather Nova itself bug then this package. Take this as simple example - it gives exactly the same behaviour:
<?php
namespace App\Nova\Filters;
use Laravel\Nova\Filters\BooleanFilter;
use Laravel\Nova\Http\Requests\NovaRequest;
class ExampleType extends BooleanFilter
{
public function apply(NovaRequest $request, $query, $value)
{
return $query;
}
public function options(NovaRequest $request)
{
return [0,1,2];
}
}
What do you guys think? In above example you can change return in options
method to [1,2] and it starts to work as expected.
Closing this if this behaviour is present in Nova itself. Thanks for the investigation!
Laravel v9.41.0 Nova v4.19.3 Nova Enum Field v3.0.1
Issue: The Filter dropdown shows that an enum filter is selected even when filters have been unchecked.
Steps to reproduce:
Expected results: