Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Allow the single click cell editing to be disabled #1099

Closed
matsbryntse opened this issue Jul 1, 2020 · 2 comments
Closed
Labels
feature request forum Issues from forum

Comments

@matsbryntse
Copy link
Member

Forum post

We're using the default double-click to enable cell editing but would like to disable the subsequent single-click to edit other cells when in edit mode.

Is this something that can be made configurable?

Needs to modify this:

/**
     * Event handler added when editing is active called when user clicks a cell in the grid during editing.
     * It finishes editing and moves editor to the selected cell instead.
     * @private
     * @category Internal event handling
     */
    onCellClickWhileEditing({ event, cellSelector }) {
        const me = this;

        // Ignore clicks in the editor.
        if (me.editorContext && !me.editorContext.editor.owns(event.target)) {
            if (me.getEditingContext(cellSelector)) {
                // Attempt to finish the current edit.
                // Will return false if the field is invalid.
                if (me.finishEditing()) {
                    me.startEditing(cellSelector);
                }
                // Previous edit was invalid, return to it.
                else {
                    me.grid.focusCell(me.editorContext.selector);
                    me.editor.inputField.focus();
                }
            }
            else {
                me.finishEditing();
            }
        }
    }
@matsbryntse matsbryntse added feature request forum Issues from forum labels Jul 1, 2020
@eiglow
Copy link

eiglow commented Mar 18, 2022

Any updates on this?

@matsbryntse
Copy link
Member Author

Supported via continueEditingOnCellClick config on CellEdit feature

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request forum Issues from forum
Projects
None yet
Development

No branches or pull requests

2 participants