小编Shr*_*wal的帖子

How to show hand hover on ReactTable rows in "React.js"

<div>
     <ReactTable
         data={this.state.listFruitData}
         columns={columns}
         defaultPageSize={10}
         getTrProps={onRowClick}
     />
</div>
Run Code Online (Sandbox Code Playgroud)
  1. I am actually populating data(listFruitData) in ReactTable from post request call.
  2. My requirement is I need to first select row of ReactTable may be using some background color so that it looks like the row is selected
  3. While I am selecting row I should get hand(icon) hover on ReactTable row
  4. How to do this?

reactjs

2
推荐指数
1
解决办法
2832
查看次数

无法从“React JS”中的“reactstrap”增加 Modal 的宽度

export class A extends Component {
    constructor(props) {
        super(props)

        this.state = {
            collapse: false,

            divWidth: {
                width: 700,
            }

        }
        this.toggle = this.toggle.bind(this);


    }
    toggle() {
        this.setState(state => ({ collapse: !state.collapse }));
    }

    render() {
        const data = [{
            name: 'Ayaan',
            age: 26
        }, {
            name: 'Ahana',
            age: 22
        }]
        const columns = [{
            Header: 'Name',
            accessor: 'name'
        }, {
            Header: 'Age',
            accessor: 'age'
        }]

        return (
            <div>
                <Button onClick={this.toggle} >
                    Click Button
                 </Button>
                <Modal isOpen={this.state.collapse} modalClassName={this.state.divWidth}>
                    <ModalHeader>Welcome</ModalHeader>
                    <ModalBody>
                        <div …
Run Code Online (Sandbox Code Playgroud)

reactjs

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

标签 统计

reactjs ×2