orlyapps / nova-belongsto-depend

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

WIP: Add showCreateRelationButton #76

Closed cwilby closed 3 years ago

cwilby commented 3 years ago

Currently testing on a project, need to fix styling and review/refactor.

LorenzoSapora commented 3 years ago

Oh nice. @cwilby did you ever look into finishing this?

cwilby commented 3 years ago

@LorenzoSapora just did - thanks for the reminder! 👍

@orlyapps this is ready to be reviewed/merged - I wrapped the input in flex align-center to adhere to Nova's showCreateRelationButton, and refactored to hide the button in modals as per Nova convention.

Kapture 2020-12-13 at 17 06 09

orlyapps commented 3 years ago

@cwilby Awesome. Big Thanks and merged!

HeinrichJulian commented 3 years ago

@cwilby After actually creating a new related entry, I'm getting a JavaScript Error:

TypeError: this.getAvailableResources is not a function

Because of that error the newly created entry is also not preset and I have to refresh the page in order to select the new option. Not sure if this is a bug in the code or if I'm missing something. Any ideas ??

cwilby commented 3 years ago

Definitely most likely a bug in the code. I'll look into it today/tomorrow.