Add support for changing options dynamically.#33
Add support for changing options dynamically.#33jmosbech merged 1 commit intojmosbech:masterfrom killpack:killpack/update_options_dynamically
Conversation
Motivation: to make this plugin more usable for pages that use responsive Bootstrap styling. On such pages, it is common for high-resolution views to use a floating "sticky" nav bar (in which case StickyTableHeaders needs an offset that's >= 0), while lower-resolution views might make the nav bar "non-sticky" to conserve screen space. When the viewport changes, it is necessary to tell StickyTableHeaders to change the fixedOffset option so that it can account for the varying "stickiness" of the nav bar. Prior to this commit, the only way to accomplish this was to destroy the StickyTableHeaders instance and recreate it. I think this fix is much easier and more efficient!
|
Merged. Thanks for contributing and sorry for the long response time. Cheers |
|
I have some issue in Stickyheader... My query is this work on window. but in my project work on div so how will solve. please Help for this. |
|
Hi, This only seems to work if I use the 'destroy' option. Which defeats the purpose. So I've set up window.addEventListener to listen for 'resize'. Then I call a function that changes the stickyTableHeaders. I seem to need to do the 'destroy' then run the same 2 lines of code to get height and call stickyTableHeaders. As I said, this works with the destroy, but I'd like to know what I need to do to implement this fix (so that I don't have to use the destroy and recreate it - as described by kill pack above). Sorry for the length of this. But I thought it best to explain in detail. |
Motivation: to make this plugin more usable for pages that use responsive
Bootstrap styling. On such pages, it is common for high-resolution views
to use a floating "sticky" nav bar (in which case StickyTableHeaders
needs an offset that's >= 0), while lower-resolution views might make
the nav bar "non-sticky" to conserve screen space. When the viewport
changes, it is necessary to tell StickyTableHeaders to change the
fixedOffset option so that it can account for the varying "stickiness"
of the nav bar. Prior to this commit, the only way to accomplish this
was to destroy the StickyTableHeaders instance and recreate it. I think
this fix is much easier and more efficient!