EloquentStudio / StreamTable.js

StreamTable.js streams data for tables in the background, updates and renders them using templating frameworks like Mustache.js, HandleBars.js
http://eloquentstudio.github.io/StreamTable.js/stream.html
MIT License
385 stars 77 forks source link

Multiple tables on same page #7

Open HSystem opened 10 years ago

HSystem commented 10 years ago

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?

HSystem commented 10 years ago

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.

HSystem commented 10 years ago

Now fixed. Tested with original examples: index.html, sorting.html, stream.html as well as new multiple.html. All worked.