Skip to content
This repository was archived by the owner on Aug 18, 2021. It is now read-only.
This repository was archived by the owner on Aug 18, 2021. It is now read-only.

Sorting the store doesn't update the sort headers #40

@jacobweber

Description

@jacobweber

If you sort your grid's store manually (e.g. by calling store.sort(...), the grid's column headers don't update.

I was able to fix it by changing Sorter.js like this:

    init : function(grid) {
        [...]
        store.on('sort', this.onSort, this);
    },

    onSort: function() {
        var grid = this.getGrid();
        if (grid.rendered) {
            grid.fireEvent('sort');
        } else {
            grid.on('painted', function() {
                grid.fireEvent('sort');
            }, null, { single : true });
        }
    },

    onDestroy: function() {
        [...]
        grid.getStore().un('sort', this.onSort, this);
    },

Note that this requires the "destroy" fix from issue #37.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions