dillingham / nova-ajax-select

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

Parent BelongsTo searchable does not work #12

Open drsdre opened 5 years ago

drsdre commented 5 years ago

I'm trying to setup a relationship between a league and a competition_matchday, for it fails when BelongsTo is set as searchable. I'm guessing this is because searchable is not a regular dropdown.

BelongsTo::make( 'League', 'league', League::class )
  ->nullable()
  ->searchable(),
AjaxSelect::make( 'Matchday', 'competition_matchday' )
  ->nullable()
  ->get( '/api/league/{league}/matchdays' )
  ->parent( 'league' ), 
blackfyre commented 3 years ago

Can confirm this