The function works fine when calling like this.
GenColumns({columns: [
{ headerText: "ID"},
{ headerText: "Doc"},
{ headerText: "Customer ID"}
] }]
But if I change to this, it doesn’t work.
var col = [{ headerText: " ID", key: "D"},
{ headerText: "Doc"},
{ headerText: "Customer ID"}
];
GenColumns({columns: [
col
] })
How can I call function passing a generated string because “col” variable will be generated and does not type manually?
Thanks Wilson
GenColumns({columns: [col] })toGenColumns({columns: col }).colis already an array