bryntum / support

An issues-only repository for the Bryntum project management component suite which includes powerful Grid, Scheduler, Calendar, Kanban Task Board and Gantt chart components all built in pure JS / CSS / TypeScript
https://www.bryntum.com
53 stars 6 forks source link

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

Closed taauntik closed 2 months ago

taauntik commented 4 months ago

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

matsbryntse commented 3 months ago

Test pushed to 8955-fillhandle