Opened 13 years ago

Closed 12 years ago

Last modified 10 years ago

#2453 closed defect (invalid)

Store.setData needs to clear items{}

Reported by: guest Owned by: Tom Trenka
Priority: high Milestone:
Component: General Version: 0.4.1
Keywords: Cc:
Blocked By: Blocking:

Description

Store.setData needs to clear items{} when it clears data[]

this.setData = function(/*array*/arr, /* boolean? */bDontFire){

summary Set up the internal data. data = []; don't fire onClearData items={}; <===== this needs to be added for(var i=0; i<arr.length; i++){

var o={ key: arr[i][this.keyField], src:arr[i] }; data.push(o); items[o.key]=o;

} if(!bDontFire){

this.onSetData();

}

};

Change History (4)

comment:1 Changed 13 years ago by guest

Store.setData needs to clear items{} when it clears data[].

        this.setData = function(/*array*/arr, /* boolean? */bDontFire){
                // summary
                // Set up the internal data.
                data = []; // don't fire onClearData
                items={};      //  <=====  this needs to be added
                for(var i=0; i<arr.length; i++){
                        var o={ key: arr[i][this.keyField], src:arr[i] };
                        data.push(o);
                        items[o.key]=o;
                }
                if(!bDontFire){
                        this.onSetData();
                }
        };

comment:2 Changed 12 years ago by Adam Peller

Component: GeneralData
Owner: changed from anonymous to Jared Jurkiewicz

comment:3 Changed 12 years ago by skinner

Component: DataGeneral
Owner: changed from Jared Jurkiewicz to Tom Trenka

I think this is actually referring to a FilteringTable? thing rather than a dojo.data thing.

comment:4 Changed 12 years ago by Tom Trenka

Resolution: invalid
Status: newclosed

Its a collections.Store thing, and its dead, so I'm closing.

Note: See TracTickets for help on using tickets.