Skip to content

Conversation

@ghiscoding
Copy link
Collaborator

@ghiscoding ghiscoding commented Nov 16, 2025

When using and enabling both autoEdit and enableExcelCopyBuffer, starting a cell selection can conflict with the editing part. What this PR does, is to provide another grid option autoEditByKeypress, which only starts editing when user starts typing a character via the keyboard, this avoid conflicting with with cell selection.

as you can see below, I focus on the cell, then start typing "123", Enter, .... and I assume that is the behavior you were looking for

brave_5FBheS9REP

@6pac
Copy link
Owner

6pac commented Nov 16, 2025

Looks great. I ran in to some issue with this when doing the drag-fill changes too.

Only one thing - could we call it autoEditByKeypress? I have functions in my libraries (not Slickgrid related, but still) named editByKey which triggers editing by passing the primary key value of the row. I probably should change them to editByPK to disambiguate.

@ghiscoding
Copy link
Collaborator Author

ghiscoding commented Nov 16, 2025

hmm it's a bit long, I'm trying to use shorter grid option names, autoEditByKeying is a bit shorter but I'm not sure if that is clear enough? I must admit that the name is clearer though, so we could still go with it

@zewa666
Copy link
Contributor

zewa666 commented Nov 16, 2025

@ghiscoding as a user you'll see that key probably only once in your apps lifetime, so I guess it really doesnt matter whether its a couple more characters or not.

@6pac
Copy link
Owner

6pac commented Nov 16, 2025

Wondering if we aren't better to have something like an editTriggerMode: Disabled, Keypress, Focus

Because it's one step at a time, we always seem to end up having a bunch of booleans that may have a conflicting combination states.

@zewa666
Copy link
Contributor

zewa666 commented Nov 16, 2025

@6pac the issue is that some options are exclusive while others can be matched. the overall combinations matrix would explode with every new "mode" as users might need just that specific mix.

the "wrong bool combo" on the other hand can be caught in the library and treated with an exception

@6pac
Copy link
Owner

6pac commented Nov 16, 2025

OK then

@ghiscoding
Copy link
Collaborator Author

ghiscoding commented Nov 16, 2025

@6pac the issue is that some options are exclusive while others can be matched. the overall combinations matrix would explode with every new "mode" as users might need just that specific mix.

the "wrong bool combo" on the other hand can be caught in the library and treated with an exception

indeed this new flag is technically working fine in combo with autoEdit, and I think that I'll end up with the autoEditByKeypress suggestion, it's more precise and clearer as to what it does exactly. I'll do that on Monday though, since I try, not always succeeding, to keep Sunday as my relaxing day

@ghiscoding ghiscoding changed the title feat: add new autoEditByKey to open editor by typing a char feat: add new autoEditByKeypress to open editor by typing a char Nov 17, 2025
@ghiscoding ghiscoding merged commit ff812c7 into master Nov 17, 2025
5 checks passed
@ghiscoding ghiscoding deleted the feat/auto-edit-by-keys branch November 17, 2025 23:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants