Not execute handlers for event formAdded

Issue #4 resolved
Wojciech Banaś created an issue

When the forms can not be removed, the event formAdds is never initiated.

It happens to function modelformset_factory or formset_factory when can_delete is False.

Comments (3)

  1. Tim Heap repo owner

    Trigger formAdded/formDeleted always

    The events were not being triggered when there was no delete checkbox, such as when the Django Formset had can_delete=False. Forms can still be added when can_delete=False, so this even should still work.

    Additionally, events were being triggered for each form when the Formset was initialised, but before the calling code could have a chance to register any events. The initial trigger is now in a setTimeout() to allow the caller to register events.

    Fixes #4

    → <<cset f50f583af645>>

  2. Log in to comment