canvas-datagrid
canvas-datagrid copied to clipboard
Feedback after the first experience
Scrolling dislocation during editing, the experience needs to be enhanced
Set e.cell.innerHTML rendering to appear superimposed, move the cursor or execute grid.draw() to disappear, Chinese content needs Unicode
After setting grid.attributes.tree = true level three, sliding the mouse wheel will jump out of the sub-grid
Thank you for the feedback, @netnr. If you have any opportunity to provide fixes for these issues, we'd gladly accept a pull request for this!
I'm sorry, I am insufficient
Using canvas to replace innerHTML works well
grid.addEventListener('rendertext', function (e) {
if (e.cell.data.type) {
var classes = [
'green',
'orange',
'red'
], ci = 0;
if (e.cell.data.number > 25) {
ci = 1;
}
if (e.cell.data.number > 150) {
ci = 2;
}
e.ctx.fillStyle = classes[ci];
e.ctx.font = '16px';
}
});