ziffmedia / nova-select-plus

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

Feature Request: Create Resource #12

Closed pegelf closed 4 years ago

pegelf commented 4 years ago

Hello,

would it be possible to add a "create" field for the attached resource? For example, the default Laravel Nova BelongsTo-field has an option showCreateRelationButton(), which adds that button right to the dropdown-menu and opens a modal for creation when clicked. So when you want to attach a resource which you forgot to create before, you can simply catch that up.

And thank you for your great package. It already makes the creation of resources a lot easier, because you don't have to open it twice just for relations.

ralphschindler commented 4 years ago

My first thought is that if you wanted to have a create modal, it would be significant work in this library to render that form and to handle it's processing. Can that form be generated by the normal nova workflow? What happens to the original resource form if the modal form fails to submit? Lots of questions to answer.

ralphschindler commented 4 years ago

For the time being, I am going to close this. It feels like creating resources from this picker is probably a bit out of scope. We can reconsider in the future if we can get some use cases and sample code together.