Comments (4)
Seemed to have missed this over the holidays! Happy with a PR that resolves this
from nova-enum-field.
Hey, do you still need PR for that? I can try to do it.
from nova-enum-field.
Sure!
from nova-enum-field.
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.
from nova-enum-field.
Related Issues (20)
- Laravel 7 support
- Nullable field HOT 3
- Convert to GitHub Actions
- Support non int values HOT 1
- Laravel 8 Support Please HOT 3
- Can we apply the enum resolution on the index? HOT 10
- Screenshot link results in 404
- Flagged enum HOT 1
- Field declaring field is required even with selected value HOT 4
- Default filter value HOT 1
- Enum column name "_backoffice" works fine, but "BACKOFFICE" shows empty value HOT 7
- Is there any way to translate enumeration in field HOT 1
- EnumBooleanFilter and EnumFilter not working properly HOT 6
- nullable() not respected by Enum::make HOT 8
- Support 4 version of bensampo/laravel-enum HOT 3
- Support 5 version of bensampo/laravel-enum HOT 2
- Nova V4 support HOT 8
- Attribute Casting Assumption HOT 2
- Add Filter HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nova-enum-field.