Closed caden311 closed 6 years ago
Any idea if there is a proper way to do this? Because It's not working for me. My code looks like this.
` afterChange: (hotInstance, change: Change) => { if (change.newVal) { const otherVal = (+change.newVal).toString(16).toUpperCase(); const rows = ourHot.countRows(); for (let i = 0; i < rows; i++) { const val = ourHot.getDataAtCell(i, MeterColumns.SERIAL_NUMBER); if (i !== change.row && (val === change.newVal || val === otherVal)) { const settings = ourHot.getCellMeta(change.row, change.col); settings.valid = false; settings.comment = {value: 'Testing adding comments'};
// this doesnt work either // const plugin = ourHot.getPlugin('comments'); // plugin.setCommentAtCell(i, MeterColumns.SERIAL_NUMBER, 'Testing yo'); } } }
} `
Any idea if there is a proper way to do this? Because It's not working for me. My code looks like this.
` afterChange: (hotInstance, change: Change) => { if (change.newVal) { const otherVal = (+change.newVal).toString(16).toUpperCase(); const rows = ourHot.countRows(); for (let i = 0; i < rows; i++) { const val = ourHot.getDataAtCell(i, MeterColumns.SERIAL_NUMBER); if (i !== change.row && (val === change.newVal || val === otherVal)) { const settings = ourHot.getCellMeta(change.row, change.col); settings.valid = false; settings.comment = {value: 'Testing adding comments'};
} `