canvas-datagrid icon indicating copy to clipboard operation
canvas-datagrid copied to clipboard

Feedback after the first experience

Open netnr opened this issue 4 years ago • 2 comments

[email protected]

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

netnr avatar Jan 30 '21 00:01 netnr

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!

ndrsn avatar Feb 01 '21 21:02 ndrsn

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';
    }
});

netnr avatar Feb 02 '21 01:02 netnr