aboutsummaryrefslogtreecommitdiffstats
path: root/src/widgets.js
diff options
context:
space:
mode:
authorMisko Hevery2011-07-11 12:55:29 -0700
committerMisko Hevery2011-07-26 09:41:42 -0700
commitc348f2cad6e2db0c3a37108eb34c8d62f2b7c718 (patch)
tree85aba2dbc5e801c9b6c09f663c141d62829b0b9c /src/widgets.js
parentf3456dc2826e9570cf2969fab3c314255d16188f (diff)
downloadangular.js-c348f2cad6e2db0c3a37108eb34c8d62f2b7c718.tar.bz2
fix(directive): ng:options incorrectly re-grew options on datasource change
Closes #464
Diffstat (limited to 'src/widgets.js')
-rw-r--r--src/widgets.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/widgets.js b/src/widgets.js
index 8fa8db4a..f8ada667 100644
--- a/src/widgets.js
+++ b/src/widgets.js
@@ -783,10 +783,13 @@ angularWidget('select', function(element){
}
}
}
- if (fragment) select.append(jqLite(fragment));
+ if (fragment) {
+ select.append(jqLite(fragment));
+ }
// shrink children
while(optionElements.length > index) {
optionElements.pop().remove();
+ optionTexts.pop();
delete lastSelectValue[optionElements.length];
}