- 38
- 0
1,i read in the react - the source code of the bootstrap.But I feel very confused, the open value is how change?The following code
dropdown.js
Dropdown.propTypes = propTypes;
Dropdown.defaultProps = defaultProps;
setBsClass('dropdown', Dropdown);
const UncontrolledDropdown = uncontrollable(Dropdown, { open: 'onToggle' });
UncontrolledDropdown.Toggle = DropdownToggle;
UncontrolledDropdown.Menu = DropdownMenu;
export default UncontrolledDropdown;
- 共 0 条
- 全部回答
-
仙女味>的<小可耐●0● 普通会员 1楼
In React Bootstrap, the value of the
openprop in a dropdown component changes when the value of theselectedprop changes. Theselectedprop determines whether the dropdown is open or closed. Theopenprop determines whether the dropdown is currently open or not. Here's an example of how theopenprop works in a React Bootstrap dropdown component: ```javascript```
In this example, the
selectedprop is set to "option1", which means the dropdown is currently open. Thedropdown-menucomponent displays the options for "option1", and theselectedprop determines whether the selected option is displayed or not. Ifselectedis "option1", thedropdown-menuwill display theulelement containing thelielements for "Link 1" and "Link 2". Ifselectedis not "option1", thedropdown-menuwill not display any options. The value of theopenprop can also be set tofalseto close the dropdown. For example: ```javascript```
In this example, the
openprop is set tofalse, which means the dropdown is currently closed. Thedropdown-menucomponent will not display any options, and theselectedprop will not be used.
- 扫一扫访问手机版
回答动态

- 神奇的四哥:发布了悬赏问题阿里云幻兽帕鲁服务器更新之后。服务器里面有部分玩家要重新创建角色是怎么回事啊?预计能赚取 0积分收益

- 神奇的四哥:发布了悬赏问题函数计算不同地域的是不能用内网吧?预计能赚取 0积分收益

- 神奇的四哥:发布了悬赏问题ARMS可以创建多个应用嘛?预计能赚取 0积分收益

- 神奇的四哥:发布了悬赏问题在ARMS如何申请加入公测呀?预计能赚取 0积分收益

- 神奇的四哥:发布了悬赏问题前端小程序接入这个arms具体是如何接入监控的,这个init方法在哪里进行添加?预计能赚取 0积分收益

- 神奇的四哥:发布了悬赏问题阿里云幻兽帕鲁服务器刚到期,是不是就不能再导出存档了呢?预计能赚取 0积分收益

- 神奇的四哥:发布了悬赏问题阿里云幻兽帕鲁服务器的游戏版本不兼容 尝试更新怎么解决?预计能赚取 0积分收益

- 神奇的四哥:发布了悬赏问题阿里云幻兽帕鲁服务器服务器升级以后 就链接不上了,怎么办?预计能赚取 0积分收益

- 神奇的四哥:发布了悬赏问题阿里云幻兽帕鲁服务器转移以后服务器进不去了,怎么解决?预计能赚取 0积分收益

- 神奇的四哥:发布了悬赏问题阿里云幻兽帕鲁服务器修改参数后游戏进入不了,是什么情况?预计能赚取 0积分收益
- 回到顶部
- 回到顶部
