I was using your modals for what I think is a common use case: Editing and creating certain models in the same form. However, a bug occurs from the following sequence:
Edit an existing model.
Submit (setting submitted true on the ember-forms component)
Create new model (setting model of modal=this.store.createRecord('model'))
Cancel without saving
As implemented the submitted boolean is still true, even though the form hasn't been submitted. I propose a simple and semantic bug fix. As I understand it, submitted is used to ensure that the on-cancel event is triggered if necessary. Once its been triggered, the boolean should be reset to maintain the invariant that it represents the submit status of the current modal. Please agree so I don't have to use a forked version of this otherwise great plugin!
Hi,
I was using your modals for what I think is a common use case: Editing and creating certain models in the same form. However, a bug occurs from the following sequence:
submitted
true on theember-forms
component)modal=this.store.createRecord('model')
)As implemented the
submitted
boolean is still true, even though the form hasn't been submitted. I propose a simple and semantic bug fix. As I understand it,submitted
is used to ensure that theon-cancel
event is triggered if necessary. Once its been triggered, the boolean should be reset to maintain the invariant that it represents the submit status of the current modal. Please agree so I don't have to use a forked version of this otherwise great plugin!