Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

onBeforeHeaderRowCellDestroy event triggered to late #52

Open
krzyzak00 opened this issue Jun 11, 2013 · 0 comments
Open

onBeforeHeaderRowCellDestroy event triggered to late #52

krzyzak00 opened this issue Jun 11, 2013 · 0 comments

Comments

@krzyzak00
Copy link

onBeforeHeaderRowCellDestroy event is triggered after $headerRowL.empty() and $headerRowR.empty() calls. jQuery empty() method removes all child nodes, data and event handlers from the child elements so when onBeforeHeaderRowCellDestroy event is triggered there is nothing left to work with. It should be:

$headerRow.find(".slick-headerrow-column")
    .each(function() {
        var columnDef = $(this).data("column");
        if (columnDef) {
            trigger(self.onBeforeHeaderRowCellDestroy, {
                "node": this,
                "column": columnDef
            });
        }
    });

$headerRowL.empty();
$headerRowR.empty();
JLynch7 pushed a commit that referenced this issue Nov 1, 2013
Fix for issue #52 'onBeforeHeaderRowCellDestroy event triggered to late' #52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant