I have an ember checkbox bound to a variable, like so:
{{input type="checkbox" click=(action 'checkboxAlert' ) checked=package.isChecked }}
The action in checkboxAlert is located in the corresponding js file as such:
checkbox(){ return confirm('are you sure?')};
I had thought that event propagation would handle the case where a user cancels the confirm dialog, in which case package.isChecked should not become true, but it does set to true even when the user cancels.
Is there a way to do this without having to manually set package.isChecked to false?
Aucun commentaire:
Enregistrer un commentaire