Skip to content

onColumnProposeMove doesn't prevent actual column move #945

Closed
@A-Posthuman

Description

@A-Posthuman

When using onColumnProposeMove to return false for a given column move, graphically when dragging we see that the columns indeed do not automatically swap places when they otherwise would, however when the mouse up happens and the moved column is "dropped", the column switch still occurs anyway.

An example of this problem can be seen in the Rearrange Columns story, where a function onColProposeMove checks if the endIndex is not 3. If you go to the story and drag the other columns, they instantly swap places when dragged, but column 3 does not, however it still will swap places after you mouse up to release the dragged column.

Activity

BrianHung

BrianHung commented on Jun 11, 2024

@BrianHung
Collaborator

Checkout #963 and lmk if that fixes the mouse up behavior.

A-Posthuman

A-Posthuman commented on Jun 11, 2024

@A-Posthuman
Author

Just tried it, and it seems to work well, thanks! I did still have to adjust the col indexes provided by onColumnProposeMove down by 1 to match my column indexes since I'm using row selectors and that bug isn't fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      Participants

      @BrianHung@A-Posthuman

      Issue actions

        onColumnProposeMove doesn't prevent actual column move · Issue #945 · glideapps/glide-data-grid