Comments (5)
Glad to hear that!
from nova-multiselect-field.
Sounds like you're filtering some field out in your controller.
The line that crashes is:
$withTrashed = $this->shouldIncludeTrashed(
$request, $associatedResource = $field->resourceClass
);
Meaning that $field was null. You should either array_filter() your fields. If you think you're not returning null, can you post your whole fields() function please. Thanks!
from nova-multiselect-field.
@Tarpsvo here's my fields function in License.php resource file:
public function fields(NovaRequest $request)
{
return [
Text::make('Name')->rules('required'),
Number::make('Validity in days', 'validity_in_days')->rules('required'),
Date::make('Activated At', 'activated_at')->readonly()->hideWhenCreating()->hideWhenUpdating(),
Date::make('Expires At', 'expires_at')->readonly()->hideWhenCreating()->hideWhenUpdating(),
BelongsTo::make('Tenant')->DisplayUsing(function ($tenant) {
return $tenant->msp_name . ' (' . $tenant->id . ')';
})->rules('required'),
Multiselect::make('Standards', 'standards')
->belongsToMany(\App\Nova\Central\Standard::class, false),
];
}
from nova-multiselect-field.
Can't reproduce this. It shouldn't even make that API request if your async is set to false.
from nova-multiselect-field.
@Tarpsvo issue has been solved. I was just refreshing the old url and thats why it was giving the issue.
The url was like: https://domain.com/nova/resources/licenses/2/attach/standards?viaRelationship=standards
from nova-multiselect-field.
Related Issues (20)
- Belongs to feature doesn't work with lasts updates HOT 2
- displayUsing() doesn't display anything HOT 1
- bug with `hide()` method
- Change the visibility of the resolveDefaultValue method to public HOT 1
- Getting this error after installing outline nova-menu-builder HOT 1
- Create issue with belongsToMany if no option selected HOT 2
- Bug: Unhide field on DependsOn doesn't send value HOT 2
- Data display with optionsDependOn
- ->dependsOn() is returning string not array of values from Multiselect (Nova 4.22.1+)
- Feature request: Show resource avatar
- Handling a Relatable BelongsToMany HOT 1
- DependsOn with api() HOT 1
- Values passed to Overwritten detail field don't come from displayUsing or resolveUsing HOT 1
- BelongsToMany Only Shows IDs / How to specify mapping HOT 1
- Async model querying with filter with api() HOT 2
- MorphedByMany support
- Migrate from `vue-multiselect` to `vueform/multiselect` HOT 1
- Clear Validate
- Please add 'Option groups' support with dependsOnOptions
- Is not compatible with Nova v4.32.14 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-multiselect-field.