support icon indicating copy to clipboard operation
support copied to clipboard

`fillHandleBeforeDragFinalize` event's param `from` and `to` are not correct when dragging from bottom to top cell

Open taauntik opened this issue 11 months ago • 1 comments

Forum post

Hi Team,

I believe I have found a bug with fillHandleBeforeDragFinalize event payload. I am attaching a video that should help explaining the issue.

In the grid demo I have enabled fillHandle only when the to cell row index is 2. I.e., in the video I drag Stockholm (row index 3) up onto row index 2 and it works fine. Then I try to drag Salad (row index 1) down onto row index 2 and it doesn't work - although I was expecting it to succeed. And then finally I drag Orange (row index 2) down onto row index 3 and it works - although I was expecting it to fail.

I think that in the Salad and Orange cases from and to are being mixed up: what is supposed to be the to cell turns out to be the from cell.

Many thanks for your work Best, Giulia


    listeners : {
        fillHandleBeforeDragFinalize(props) {
            // console.log(props);
            console.log({ to : props.to });
            console.log({ from : props.from });
            if (props.to.rowIndex !== 2) {
                return false;
            }
        }
    },

https://github.com/bryntum/support/assets/75997756/7a924770-c0c2-4c9f-a3d8-76d35437156f

taauntik avatar Apr 05 '24 15:04 taauntik

Test pushed to 8955-fillhandle

matsbryntse avatar May 11 '24 17:05 matsbryntse