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

Question: Events for editor with mode='grid' #98

Closed
algbeta opened this issue Feb 8, 2017 · 3 comments
Closed

Question: Events for editor with mode='grid' #98

algbeta opened this issue Feb 8, 2017 · 3 comments

Comments

@algbeta
Copy link

algbeta commented Feb 8, 2017

Hi!

If i use editor plugin in mode = 'inline' I can see that there are several types of events going on

  HANDLE_BEFORE_INLINE_EDITOR_SAVE: () => {}
  HANDLE_AFTER_INLINE_EDITOR_SAVE: () => {}

Is it possible to create something similar grid mode when i try to switch to another cell for editing?
for example:

  HANDLE_BEFORE_EDITOR_START: () => {}
  HANDLE_AFTER_EDITOR_END: () => {}

or is there another way to catch losing focus of cell input when i finish editing?

Thanks!

@bencripps
Copy link
Owner

This would be a great feature to add as well! Per #96, I will label this one as help wanted but I will get to this one as soon as I can!

@bencripps
Copy link
Owner

New Events

HANDLE_EDITOR_FOCUS: () => {
    console.log('Handle editor focus');
},
HANDLE_EDITOR_BLUR: () => {
    console.log('Handle editor blur');
}

If you are using the default grid editor

These events will be fired with the default, as long as you have defined the methods in the grid events prop.

If you are creating a custom editor

Apart from the existing props that get passed to the editor function, onBlur and onFocus will now be available. In order for these events to fire, they need to be attached to whatever component you are rendering.

This will be released as part of this weeks release!

@bencripps
Copy link
Owner

Published in 5.1.9

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

No branches or pull requests

2 participants