ce
ce copied to clipboard
Add default headers as key in the in getjson method
Get key default / modified header as a key in getJson method for for each column, right now we only get index number.
Hi,
You can defined name property of column when you change header :
const myTable = jspreadsheet(DOMElement, {
/* ... your config ... */
onchangeheader: function(el, column, oldValue, newValue) {
this.options.columns[column].name = newValue;
},
});
And after, when you call myTable.getJson()
, you have property name instead of index in result