adopted-ember-addons / adopted-ember-addons/ember-changeset

Async validator question

Aperta
#102 11 commenti 0 reazioni 1 assegnatario Rivendicata da @poteto Vedi su GitHub
Lingua principale
JavaScript
Stelle
425
Fork
136
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

Hi,

Is there a way to check if a changeset has changed since it was last validated?

Ideally setting any prop: `changeset.set('prop', 1)` will turn `changeset.get('isValid')` false, until all validators (async here is the issue) resolve.

This would allow us to disable UI until we know for certain that everything is resolved and valid.

Currently, if there is a slow async validator, the changeset will be in `isValid` true, but in reality, it is still unresolved, and therefor, the user may proceed to submit and then the world falls apart.

Let me know what you think.

Thanks

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.