react-bootstrap - bsPrefix prop not working for React Bootstrap?
问题描述
I need to change the base class for the Popover component in React Bootstrap as styles have been set globally for popover
which are conflicting with a new component Im trying to make.
The doc say the bsPrefix
prop can do this but it's not working for me. When I pass it to my component the base class doesn't change it just gets rendered out to the DOM
In React:
<Popover id="popover-basic" bsPrefix="find-me">
{children}
</Popover>
In the DOM:
<div id="popover-basic" bsprefix="find-me" role="tooltip" class="fade in popover bottom" style="display: block; top: 202px; left: 590px;">
解决方案
Turns out I had an old version of the library. Updating 0.31.5 to 1.0.0-beta.8 (latest) and it works.
推荐阅读
- javascript - 方法 Illuminate\Validation\Validator::validateVideo 不存在
- javascript - Django CSRFToken 中间件附加到 URL 并在向服务器发出“PUT”请求后显示。(AJAX 问题)
- r - 在 mutate 函数中使用 rm_between 提取字符串
- javascript - 一次将多个图像上传到 Firebase
- python-3.x - 如何使用 aws sdk boto3 创建 aws 代码管道?
- okhttp - 3.x版本存在导致请求正文发送错误的bug
- javascript - autocomplete.js autoCompleteJS 未定义
- python - 有什么问题吗?
- azure - AAD 权限提升
- php - recaptcha 与联系表 7 正常工作的问题