![](/img/trans.png)
[英]React-Bootstrap 2022: Modal Will Not Close When X button clicked
[英]How to align react-bootstrap modal relative to the button clicked
我有一个 react-bootstrap-modal this ,我想相对于点击的按钮显示我的模态,我的 react-bootstrap-table 中有一个选项,所以当我点击该选项时,我正在显示我的模态,但它不是相对对齐。
我正在使用contentClassName
来覆盖.modal-content
,我不知道,但它没有按预期工作
<Modal show={props.show} onHide={props.handleClose} contentClassName="modal_l" // this is I am doing to override aria-labelledby="example-custom-modal-styling-title"> <div className="container_modal_options"> <div className="heading">Heading</div> <div className="content">"content</div> </div> </Modal>
在这里我分享最少的代码,
.modal_l {
width: 100px !important; it is not taking styling
}
我想在右侧显示模态,点击附近
您应该将contentClassName
更改为dialogClassName
。
.modal_l {
width: 100px !important;
max-width: none !important;// set max-width, if needed.
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.