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

Call stateChange before the other callbacks #33

Open
jpobley opened this issue Jan 28, 2015 · 2 comments
Open

Call stateChange before the other callbacks #33

jpobley opened this issue Jan 28, 2015 · 2 comments

Comments

@jpobley
Copy link

jpobley commented Jan 28, 2015

Currently, the stateChange callback is the last function to be called after hiding/showing a column (colVis.js:640).

If stateChange callback is moved to a place before the other callbacks, then an application can know which column was hidden/shown before the table redraws. The main use case for this is when I'm tracking column visibility outside of the dataTables API and need to use it during one of the other callbacks, like createdRow or rowCallback. I add data-* attributes to DOM elements during the other callbacks based on which columns are visible.

@DataTables
Copy link
Collaborator

Probably best to have both callbacks - pre and post thinking about it.

ColVis is due for a rewrite, so I'll make sure to look into this when I get to that.

@jpobley
Copy link
Author

jpobley commented Jan 28, 2015

Ok. I'm happy to put together a pull request for a pre callback if you don't think you'll get to the ColVis rewrite for a while.

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