-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Modal, how to get access to onBlur method? #1400
Comments
You may need to update to
Indeed, |
I just got 0.66.0 and you're right, the error is gone now for closeOnDocumentClick.
|
Hm, I'm not sure on this one (not a ts user). All those props are listed in the component and the typings. @layershifter sure knows the answer here. Side note, you should now use |
Oh, my miss 😢 PR is comming... |
i tried |
In about 10 minutes 😄 |
Or an hour... Released in |
everything working perfectly in 0.67! 👍 you guys are awesome |
I'm using the modal in a slightly different way, controlling it's opening/closing using an event dispatcher. I'd like to use the native React event handler onBlur so that I can do so:
<Modal open={true} dimmer={false} onBlur={this.handleClose} ... >
private handleClose = () => ModalWindowService.closeModal();
Of course, since I'm using TypeScript and I'm a n00b at it, I get this error:
ERROR in ./src/components/Modal/AssignBasketModal/AssignBasketModal.tsx
(34,55): error TS2339: Property 'onBlur' does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributes<Component<ModalProps, ComponentState>> & { childre...'.
I've realized that setting closeOnDocumentClick to true would do the same thing, however, I noticed this functionality doesn't work if the Modal open={true}
The text was updated successfully, but these errors were encountered: