-
Notifications
You must be signed in to change notification settings - Fork 86
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
onBlur prop #93
Comments
Not sure if it make sense to include the functionality into the widget. This can easily be achieved by extending autocomplete in the following way: function extendedAutocomplete(settings) {
function handler(e) {
console.log('blur');
}
settings.input.addEventListener('blur', handler);
var result = autocomplete(settings);
return {
destroy: () => {
settings.input.removeEventListener('blur', handler);
result.destroy();
}
}
} Then just call |
there is a way to get the option with "selected" class on blur? |
@3rd1t The widget doesn't support this out of the box, so a workaround is needed to achieve something like this. You can use the code below to achieve it:
|
it would be great if you add possibility to pass onBlur prop for handling this event.
I made PR
The text was updated successfully, but these errors were encountered: