Quantcast
Channel: SmartClient Forums
Viewing all articles
Browse latest Browse all 4756

GroupState fires changes when setting data

$
0
0
Hey guys,

found a bug when working with the “groupStateChanged” event.

I built a listGrid which includes a groupByField. Afterwards I put some data into the listgrid via listgrid.setData(). When doing so, the event “groupStateChanged” will fire. This event shouldn’t fire when setting data, because the groupState can’t be different afterwards.

Following a small example including the issue

Code:

isc.ListGrid.create({
        "ID" : "listGrid",
        "groupStateChanged" : function () {
                isc.say("groupStateChanged fired<br>Is the new groupState the same like initially?<br>" + (viewStateBefore == listGrid.getGroupState()))
        },
        "fields" :
        [{
                        "name" : "name"
                }
        ],
        "groupByField" : "name"
});
var viewStateBefore = listGrid.getGroupState();
listGrid.setData([{
                        "name" : "One"
                }, {
                        "name" : "Two"
                }
        ])

This is reproducable with the latest nightly SmartClient_v100p_2015-02-20_Pro and happens in all current browsers (Firefox, Chrome and IE)

Best Regards

Viewing all articles
Browse latest Browse all 4756

Trending Articles