From 2efbc53b33651a89a94f6ef6cd8ab0d70a9cba3a Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Tue, 26 Jun 2012 16:26:32 +0000 Subject: [PATCH] only update list values once list has loaded --- source/Ox.UI/js/Form/FormPanel.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/source/Ox.UI/js/Form/FormPanel.js b/source/Ox.UI/js/Form/FormPanel.js index 187de87f..27eaa403 100644 --- a/source/Ox.UI/js/Form/FormPanel.js +++ b/source/Ox.UI/js/Form/FormPanel.js @@ -120,9 +120,10 @@ Ox.FormPanel = function(options, self) { .hide() .appendTo(self.$section); }); - - self.$forms.forEach(function($form, i) { - self.$list.value(self.options.form[i].id, 'valid', $form.valid()); + self.$list.bindEvent('load', function() { + self.$forms.forEach(function($form, i) { + self.$list.value(self.options.form[i].id, 'valid', $form.valid()); + }); }); self.$sections[0].show();