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

Async validator question

Ouverte
#102 11 commentaires 0 réactions 1 personne assignée Réclamée par @poteto Voir sur GitHub
Langage dominant
JavaScript
Étoiles
425
Forks
136
Métriques de merge des PR
Aucune PR mergée en 30 j

Description

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

Guide de contribution

Ouvrir le guide de contribution

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.