init datalist at startup so each successive instance isn't appending to the same...
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 9 Feb 2009 01:05:05 +0000 (01:05 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 9 Feb 2009 01:05:05 +0000 (01:05 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@12111 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/web/js/dojo/openils/widget/FilteringTreeSelect.js

index b6f9636..6c4e11f 100644 (file)
@@ -25,7 +25,6 @@ if(!dojo._hasResource["openils.widget.FilteringTreeSelect"]){
             labelAttr : 'name',
             childField : 'children',
             tree : null,
-            dataList : [],
 
             startup : function() {
                 this.tree = (typeof this.tree == 'string') ? 
@@ -35,6 +34,7 @@ if(!dojo._hasResource["openils.widget.FilteringTreeSelect"]){
                     return;
                 }
                 if(!dojo.isArray(this.tree)) this.tree = [this.tree];
+                this.dataList = [];
                 var self = this;
                 this.tree.forEach(function(node) { self._makeNodeList(node); });
                 this.store = new dojo.data.ItemFileReadStore(