Skip to content
This repository has been archived by the owner on Dec 23, 2017. It is now read-only.

Load data for tabs on tab selection. #441

Merged
merged 1 commit into from
Aug 7, 2015

Conversation

jmcarp
Copy link
Contributor

@jmcarp jmcarp commented Aug 7, 2015

Add the onShow helper, which creates a one-time event listener to do
some work when the specified tab is selected. Also add the
initTableDeferred helper, which defers table initialization until the
parent tab is displayed.

@noahmanger this coincidentally fixed #359, which seems to be related to rendering tables in hidden tabs. Now that we don't render the table until the tab is displayed, that behavior goes away.

[Resolves #345]
[Resolves #359]

Add the `onShow` helper, which creates a one-time event listener to do
some work when the specified tab is selected. Also add the
`initTableDeferred` helper, which defers table initialization until the
parent tab is displayed.

[Resolves fecgov#345]
[Resolves fecgov#359]
@noahmanger
Copy link
Contributor

Excellent. This works for me. Nice that it solves #359 -- so weird that Datatables calculates the column widths the way it does.

I'll let @msecret review the JS but I like it.

msecret pushed a commit that referenced this pull request Aug 7, 2015
Load data for tabs on tab selection.
@msecret msecret merged commit 8e01711 into fecgov:develop Aug 7, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix table header bug Load API data lazily
3 participants