ziffmedia / nova-select-plus

A Laravel Nova Select Field
MIT License
91 stars 26 forks source link

Doesn't show pickable options #34

Closed nikans closed 3 years ago

nikans commented 3 years ago

The field presents already picked options just right, but the list of available options is empty.

Screenshot 2021-03-25 at 06 55 58

I'm able to correctly delete the elements, and also add one weird empty element, though can't save because the id is empty.

Screenshot 2021-03-25 at 06 56 55
return $this->belongsToMany(GrammarInfoEntry::class,  'grammar_info_topic_entry')
            ->using(GrammarInfoTopicEntry::class)
            ->withPivot('sort')
            ->orderBy('sort')
            ->withTimestamps();
SelectPlus::make('Child Entries', 'grammarInfoEntries', '\App\Nova\GrammarInfoEntry')
                ->label('title')

The request for grammarInfoEntries actually returns html for the whole page, including when filtering with ajax.

Nova v3.22.0

nikans commented 3 years ago

I had to fix a routing error (Laravel 8.34.0 is being broken by Routes with closure, though looks like Nova/Laravel pre-package one in app/routes/api.php).

After that, php artisan route:cache.