paulopmx / Flexigrid

Lightweight but rich data grid with resizable columns and a scrolling data to match the headers, plus an ability to connect to an xml/json based data source using Ajax to load the content.
689 stars 539 forks source link

onChangeSort is not repopulating gris #152

Open Diliz opened 8 years ago

Diliz commented 8 years ago

On changeSort function, I found that if I set a onChangeSort function, this.populate() is not triggered since it's not in the right condition, actually:

if (p.onChangeSort) {
    p.onChangeSort(p.sortname, p.sortorder);
} else {
    this.populate();
}

What I did to reload correctly the grid on sort:

if (p.onChangeSort) {
    p.onChangeSort(p.sortname, p.sortorder);
}
this.populate();

Is this a bug or is it something you did on purpose? :)

Thanks for reading