-
Notifications
You must be signed in to change notification settings - Fork 427
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
Passing the user event to the cell editor #276
Comments
PRs are always welcome! Also, check out 'PreClick mode' here: https://github.com/6pac/SlickGrid/wiki/Writing-custom-cell-editors |
Thanks for your response. I had a look at the link you included but it doesn't meet my requirements unfortunately. I am looking to have a custom text cell editor (which I have already written following one of the guides). The requirement is to essentially have it behave like excel. I have set the autoedit feature to "off" so that a cell edit only happens on an "enter" key press or a mouse double click. If the cell has text in it and is active but not in edit mode, then a key press of say "a" should causes the cell to jump into edit mode, wipe out the current value and write "a" in the editing text box. However, if the user presses F2, then the cell should go into edit mode with the existing value defaulted. I am aware that the Excel requirement is very specific for me, which is why I have written my own cell editor, but in order for me to get my editor to behave correctly on initialization, I need to know what event happened beforehand. I have everything working in my local copy, it just required the event argument to be passed through all the way to the editor's constructor. |
Email me the changed files if you like, and I'm happy to patch the hooks in to the repo. What I look for when considering changes is the general usefulness across a range of plugins or use cases, and it sounds like this fits the bill. You may as well send the editor as well, it would be a useful example of how to use this new hook. |
…injector to columnpicker and cellexternalcopymanager. Add ability to export header row to cellexternalcopymanager.
I've added these patches and pushed to the repo. Will do a release (NPM etc) soon. Sorry about the really long delay! |
Many thanks, much appreciated. |
injector to columnpicker and cellexternalcopymanager. Add ability to export header row to cellexternalcopymanager. as per commit 0abf432
…ame injector to columnpicker and cellexternalcopymanager. Add ability to export header row to cellexternalcopymanager.
There are times when the cell editor should initialize differently depending on how the cell editor request came about. Whether that be a certain key press or mouse click. (Excel does this)
Please can you include the user event object as a field in the args object that gets passed to the constructor of the cell editor. I am happy to provide a code patch if you think it would be helpful.
The text was updated successfully, but these errors were encountered: