commit fd6b7f0df379271130a8fa09c64bc092772c8052
parent 7e5ee6f0a9084a34315fce978c40def5eb18a4de
Author: Felicitus <felicitus@felicitus.org>
Date: Wed, 4 Jan 2012 23:22:01 +0100
Added re-validation due to the asynchronous nature of the new storageLocation dropdown field
Diffstat:
1 file changed, 5 insertions(+), 0 deletions(-)
diff --git a/src/frontend/js/Components/Part/Editor/PartEditor.js b/src/frontend/js/Components/Part/Editor/PartEditor.js
@@ -198,6 +198,11 @@ Ext.define('PartKeepr.PartEditor', {
onEditStart: function () {
this.bindChildStores();
this.nameField.focus();
+
+ // Re-trigger validation because of asynchronous loading of the storage location field,
+ // which would be marked invalid because validation happens immediately, but after loading
+ // the storage locations, the field is valid, but not re-validated.
+ this.getForm().isValid();
},
_onItemSaved: function () {
this.fireEvent("partSaved", this.record);