braincrafted / bootstrap-bundle

BraincraftedBootstrapBundle integrates Bootstrap into Symfony2 by providing templates, Twig extensions, services and commands.

Home Page:http://bootstrap.braincrafted.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[JS] Trigger event on Add and Remove from collection (sugestion)

tlfbrito opened this issue · comments

This there a way to catch add/remove events from bc-bootstrap-collection ? If not, shouldn't we fire event to allow people subscribe them?

Thanks for this bundle and your work.

+1 :)
and thanks too!

This should be closed with #311

commented

@TiagoBrito can you provide an example?

Is it possible to fire an event right after the collection has been updated ?

Something like this ?

$this.trigger('bc-collection-field-before-remove');
var listElement = $this.closest('li').remove();
$this.trigger('bc-collection-field-after-remove');