在reactjs中侦听引导程序模式关闭事件 [英] Listen for bootstrap modal close event in reactjs

查看:79
本文介绍了在reactjs中侦听引导程序模式关闭事件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有一种方法可以监听引导程序模式关闭?在纯jQuery中,我会做类似的事情:

is there a way I can listen for a bootstrap modal closing? In pure jQuery I would do something like:

$('#myModal').on('hidden.bs.modal', function () {
     // do something…
})

但是,做出反应的适当方式是什么?

However, what would be the appropriate way to do it in react?

提前谢谢!

推荐答案

如果您使用的是

If you are using react-bootstrap's modals You can pass the handler function via onHide or onExit prop.

这篇关于在reactjs中侦听引导程序模式关闭事件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆