I have 7 columns, and I want to perform a traversal on 5th column such that, at each row of that column, there is a function operation performed on it and the data gets immediately updated right there. This code basically checks the cell, if the data value is ‘<0’ then it gives “X”, if it is ‘==0’ it gives “O”, if it is ==1 it gives 1, if it is ==2 it gives 2, if it is ==3 it gives 3. I am having lot of difficulties, anyone can understand and help out?
columnSummary: [ { sourceColumn: 5, type: 'rank', destinationRow: 0, destinationColumn: 5, rank(endpoint) { const hotInstance = this.hot; const checkRange = rowRange => { let i = rowRange[1] || rowRange[0]; let counter = 0; do { if (parseInt(hotInstance.getDataAtCell(i, endpoint.sourceColumn)) < 0) { return "X"; counter++; } else { return "O"; if(parseInt(hotInstance.getDataAtCell(i, endpoint.sourceColumn)) == 1) { return 1; } else if (parseInt(hotInstance.getDataAtCell(i, endpoint.sourceColumn)) == 2) { return 2; } else if (parseInt(hotInstance.getDataAtCell(i, endpoint.sourceColumn)) == 3) { return 3; } } i--; }while (i >= rowRange[0]); } } } ]