Closed Leooo closed 9 years ago
So, if I'm correct in understanding, there are two issues here:
destroy
is now a method on Ember.Controllerthis
is undefined in the view's destroy handlerSorry, yes I added _eventHandler
here but this more a hack to solve https://github.com/sir-dunxalot/ember-easy-form-extensions/issues/18#issuecomment-95507098.
Here I just added this.$("input").blur();
to force the validation of input fields before submitting: if I dont do this my form would'nt save but I don't see any error on the form (which is a form for a new model instance). I thought it may be useful to include the blur()
line by default in ember-easy-form-extensions
Ok, cool. I think there's a bigger issue here to do with the latest Ember release. This addon should show the error message on submit already (see source here). I think something has changed in the view layer or similar that's causing all these issue to combine.
I'll look into everything this weekend - keep sending the issues my way! Thanks.
I've recreated this issue in another app. I think your solution is nice and simple. Another option is to refactor the Submitting mixin to work on the {{form-wrapper}}
component - that whole set up needs a rethink. I am planning on rewriting a lot within the next couple of weeks.
This is fixed with the major upgrade for Ember 1.11+ currently in prerelease. You can test the prerelease here. Please note the API for inputs has changed slightly from the original Easy Form syntax.
Feedback for the new setup and options will be very much appreciated.
This will be fixed by #37