小编Sum*_*rai的帖子

Reactstrap 下拉菜单打开倍数菜单

下面是我的页面截图:

在此处输入图片说明

我使用 reactstrap 下拉菜单将按钮与菜单绑定。每当我单击一个按钮时,所有下拉菜单都会打开。下面的快照是下拉问题:

在此处输入图片说明

这是我使用的代码:

 import React, { Component } from 'react';
    import './Home.css';
    import { Dropdown, DropdownToggle, DropdownMenu, DropdownItem } from 'reactstrap';

    export class Home extends Component {
        constructor(props) {
            super(props);
            let $this = this;
            $this.toggle = $this.toggle.bind($this);
            $this.state =
                {
                    dropdownOpen: false
                };
        }
        toggle() {
            this.setState(prevState => ({
                dropdownOpen: !prevState.dropdownOpen
            }));
        }
    render() {
        return (
            <div className="table-div table-responsive-xl">
                <table className="table table-hover">
                    <thead>
                        <tr>
                            <th scope="col" />
                            <th scope="col">Authentication</th>
                        </tr>
                    </thead>
                    <tbody>
                        {this.state.slackmembers.map((item, key) => {
                            return …
Run Code Online (Sandbox Code Playgroud)

drop-down-menu reactjs reactstrap

0
推荐指数
1
解决办法
3398
查看次数

标签 统计

drop-down-menu ×1

reactjs ×1

reactstrap ×1