Skip to content

Clicks on interactive controls inside editable cells also start the cell's edit session #80

Description

@zvndev

Problem

When an editable cell's display renderer contains an interactive control (a toggle/switch, a button), clicking that control ALSO starts the cell's edit session — the click bubbles to the cell's edit-entry handler. Example: a cell rendering a channel on/off switch next to an editable price; clicking the switch flips it and pops the price into an editor the user never asked for.

Repro

Editable column whose cell renders <input type=checkbox> or any button → click the control → getIsEditing() becomes true for that cell.

Workaround

Wrap the control in an element that stopPropagation()s pointerdown/mousedown/click/dblclick.

Suggested fix

The edit-entry handler should ignore events originating from interactive elements (event.target.closest('button, input, [role=switch], a, select, [data-yable-no-edit]')) — or document a supported data-yable-no-edit escape hatch.

Versions: yable-react 0.10.4 / yable-core 0.9.0.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions