EasyAdminBundle
EasyAdminBundle copied to clipboard
Add collection reference to 'ea.collection.item-added' and "ea.collection.item-removed" events
It would be helpful to have the collection tag available as detail of the events "ea.collection.item-added" and "ea.collection.item-removed" events, otherwise there is no simple way to know which add or trash button was pressed, if there is more than 1 collection field in the page.
It's a matter of changing these two lines in field-collection.js.
Line 19
document.dispatchEvent(new Event('ea.collection.item-removed'));
Line 70
document.dispatchEvent(new Event('ea.collection.item-added'));
You can use new CustomEvent(
The rest of EasyAdmin code is unaffected.