Giter VIP home page Giter VIP logo

Comments (5)

Tarpsvo avatar Tarpsvo commented on August 17, 2024 1

Glad to hear that!

from nova-multiselect-field.

Tarpsvo avatar Tarpsvo commented on August 17, 2024

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.

anandmainali5 avatar anandmainali5 commented on August 17, 2024

@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.

Tarpsvo avatar Tarpsvo commented on August 17, 2024

Can't reproduce this. It shouldn't even make that API request if your async is set to false.

from nova-multiselect-field.

anandmainali5 avatar anandmainali5 commented on August 17, 2024

@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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.