Comments (7)
Ok so stupid... :-( I missed this part.
use HasConditionalContainer; // Important!!
from conditional-container.
If am not mistaken boolean field yield a value yes
and no
instead of true/false
can you try
ConditionalContainer::make([...])->if(field === yes)
I can double-check it in an hour or so
Edit
What package are you using? is it the native Boolean::make()
field that ships with nova? or some third party package?
from conditional-container.
I just tested using the native nova Boolean field and it worked:
Boolean::make('Test',' 'test'),
ConditionalContainer::make([...])->if(test == 1),
ConditionalContainer::make([...])->if(test truthy true)
from conditional-container.
Default Boolean yes...
I've got this. Toggling the checkbox does nothing. Maybe doing something wrong somewhere...
... Boolean::make('Field', 'field')->hideFromDetail(), ConditionalContainer::make([ Markdown::make('Content', 'content')->hideFromIndex()->hideFromDetail(), Text::make('Name', 'name')->hideFromIndex()->hideFromDetail(), Text::make('email', 'email')->hideFromIndex()->hideFromDetail(), ])->if('field truthy true'), ...
from conditional-container.
I'm not sure whats the issue on your case, I just copy/paste your sample fields and it worked:
Perhaps you are not on the latest versions? Nova 2.5.0
ConditionalContainer v1.0.4
from conditional-container.
Maybe I'm doing something else wrong. I tried with different conditions like:
Text::make('Naam'), ConditionalContainer::make([ Text::make('test'), ])->if('naam = test'),
Doesn't seem to be the problem of the Boolean because none of the conditions I try will work. Will do some experimenting to see if I can find out why...
The versions are the latest so that won't be the problem.
from conditional-container.
I see yeah that trait is important! Perhaps later I will add a note on Readme empathizing the need of that trait
from conditional-container.
Related Issues (20)
- Conditional Container not showing in detail view page HOT 8
- Column not found error when using media package HOT 9
- TypeError: this.field.expressionsMap is undefined HOT 1
- Upgrading to Nova 3.21 breaks ConditionalContainer with HasMany field HOT 5
- BelongsToManyField still not working inside ConditionalContainer HOT 3
- Use of a resource field inside Flexible layout HOT 1
- Fields Are Not Updating HOT 3
- Default and Readonly
- BooleanGroup support HOT 1
- field not shown in index view HOT 4
- v1.4.1 not working HOT 2
- if condition not working with boolean values HOT 1
- Can't download thumbnail if conditionalcontainer is used HOT 1
- Field authorization not working HOT 1
- MorphTo bug
- Add Laravel Nova 4 support HOT 9
- Nova 4 Support HOT 2
- Bug with Boolean Field inside Conditional Container
- Validations not working HOT 2
- how about nova4 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 conditional-container.