orlyapps / nova-belongsto-depend

Larave Nova BelongsTo Field with Dependcy
MIT License
182 stars 65 forks source link

Press enter to remove does not work #48

Closed bbutler101 closed 4 years ago

bbutler101 commented 5 years ago

Hi, When I tried to remove the selected option, it doesn't make it un-selected currently.

Can you please check if it works for you?

NovaBelongsToDepend::make('something')
                ->nullable()
                ->options(\something\Team::all())
                ->hideWhenCreating(),
jimwhiteside commented 4 years ago

I think I have encountered the same problem - if the field is defined as nullable() you can submit a field with no value selected, but once a value has been selected and saved you cannot then clear it.

Steps to reproduce:

1/ Create a record but leave this filed empty - model is created with null value 2/ Edit record and select a value, save, model is updated with selected value 3/ Edit record - clear value (delete key works for me), save, model retains the selected value

orlyapps commented 4 years ago

Thanks -working on a fix!

orlyapps commented 4 years ago

fixed in 9e6e8a4769813c593d50115968321e0d1f220ebb