Add CRUD form option for to-one associations - #5353
Conversation
ghost
left a comment
There was a problem hiding this comment.
This feature would be really useful, thanks for your hard work!
I tried to make your pull request work inside my project but I still have some issues. I don't know if this is only related to my project and my use of your code.
|
@devzenfr Thank you for finding and fixing this errors! I think the PR is finished now. |
Can confirm that it looks great. I'm now using a fork including your PR and everything is working smoothly. Nice job 🙏 |
|
hey @michaelKaefer , thank you for your work . is this PR going to be merged soon ? |
|
Hi @ahmedyakoubi , no sorry, I don't know if and when it gets merged. |
|
I apologize to @michaelKaefer for not having merged this on time. I'm going to try to merge it soon. |
|
thank you @javiereguiluz and @michaelKaefer . |
|
This is finally merged 🙏 Michael, thanks a lot for this contribution. Your code was very easy to follow and implemented the feature in a nice and concise way. I also thank you for the reproducer (https://github.com/michaelKaefer/ea-reproducer/tree/association-field-use-crud-form) because it allowed me to play with the feature very easily. While merging I did some tweaks. First, I reworded the docs a bit because I had some troubles while trying to fully understand the purpose of the feature. If I did some mistakes, we can fix it in a follow-up PR. Second, I renamed the option to Here are the tweaks: ae79fa8 |
|
Thank you, the docs are a lot better now, good to understand! |
Functionality introduced in EasyCorp#5353 rendered sub-CRUD controller with context of the primary CRUD controller. With invalid context some functions, like default fields generation, aren't working properly. See EasyCorp#5512
Functionality introduced in EasyCorp#5353 (AssociationType) and in EasyCorp#5210 (CollectionType) rendered sub-CRUD controller with context of the primary CRUD controller. With invalid context, some functions, like default fields generation, aren't working properly. See EasyCorp#5512
Functionality introduced in EasyCorp#5353 (AssociationType) and in EasyCorp#5210 (CollectionType) rendered sub-CRUD controller with context of the primary CRUD controller. With invalid context, some functions, like default fields generation, aren't working properly. See EasyCorp#5512
Functionality introduced in EasyCorp#5353 (AssociationType) and in EasyCorp#5210 (CollectionType) rendered sub-CRUD controller with context of the primary CRUD controller. With invalid context, some functions, like default fields generation, aren't working properly. See EasyCorp#5512
Without this PR the association field renders a a dropdown and you cannot edit the associated entity but just select an already existing entity. If you want to edit an associated entity you cannot use
AssociationFieldand so you have to create a custom EA field. Creating a custom EA field doesn't allow using EA fields and could sometimes kind of duplicate the CRUD form of the associated entity. This PR would enable you to use the CRUD form forAssociationFieldif it is a to-one association (for to-many associationsCollectionFieldcan be used).I createad a reproducer: https://github.com/michaelKaefer/ea-reproducer/tree/association-field-use-crud-form.
Similar to #5210.