-
Notifications
You must be signed in to change notification settings - Fork 79
Multiple tables on same page #7
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
base: master
Are you sure you want to change the base?
Conversation
An example and corresponding edits to stream_table.js to be able to use multiple StreamTable.js on one page
The progress indicator was removed when first one hit 2000.
The new selector is slightly more restrictive, in case somebody has .active in container for other purposes.
There is actually still a small bug, that breaks the original stream.html example. (In a case where search_box hasn't been given an id in initialization. I'll look into fixing it, and submitting a new pull request once fixed. |
As my code prepends a '#' to the search_box id later on, this caused issues (double ##) when search_box wasn't provided in initialization parameter as in multiple.html-example. Now fixed.
Now fixed. Tested with original examples: index.html, sorting.html, stream.html as well as new multiple.html. All worked. |
}; | ||
|
||
_F.bindEvents = function(){ | ||
var _self = this, | ||
search_box = this.opts.search_box; | ||
search_box = '#'+this.opts.search_box; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not the maintainer on this, but as a user, I'd much rather be able to provide any jQuery selector and not be constrained to an ID.
Here is an example of multiple stream_tables on same page. The example closely resembles the stream.html example, but it has the initial HTML for two tables. It requires that the HTML has uniqueIds for elements. If both tables contain same columns, one template can be utilized. Also a few slight modifications to the stream_table.js were necessary in order to have the paging/searching work as intended. I hope you can review this, and merge it back to the project?