-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
Hi,
I was 'playing with JSONTable' with 2 JSONTable on the same page but there was problems on the second table ( with the version you give me access to)
After tracing, I've seen that you are overwriting the defaultopts array.
I bypassed the problem by copying the array first. See code under.
var table = function(id,json,opts) {
++tableCount;
var targetdiv, columns, settings, table, thead, tbody, columnsJSON, tableAttrs;
columnsJSON = [];
targetdiv = document.getElementById(id);
var newdefaultopts = JSON.parse( JSON.stringify( defaultopts ) );
settings = extend(newdefaultopts,opts)
// send the whole array only if(deepScan):
columns = (settings.deepScan) ? getColumns(json, settings) : getColumns([json[0]], settings);
....
Thanks for your help last time.
Metadata
Metadata
Assignees
Labels
No labels