dillingham / nova-ajax-select

Ajax select / child select package for Laravel Nova
MIT License
87 stars 22 forks source link

Support for edit of existing resource? #8

Closed preliot closed 5 years ago

preliot commented 5 years ago

When i try to edit an existing resource, i expect the value to be pre-selected. However, this is not the case. I'm missing something, but what am i doing wrong?

use App\Nova\Client\Client as ClientResource;

return \NovaAjaxSelect\AjaxSelect::make(ClientResource::singularLabel(), 'client') ->get(config('nova.path') . '/orglevel/distributors/{distributor}/clients') ->parent('distributor') ->rules('required');

preliot commented 5 years ago

My mistake. Should have used client_id, related to #9