Code Monkey home page Code Monkey logo

Comments (4)

AllenFang avatar AllenFang commented on July 25, 2024

hello @chuchengcao, I've fix this problem on v0.9.9 :)

from react-bootstrap-table.

chuchengcao avatar chuchengcao commented on July 25, 2024

hello @AllenFang , v0.9.9 still has some problem. The data updated but the result is not filtered by the search string. Look for this example, type 'sdf' -> change-data -> expect the table shows result which only contain 'sdf' string according to the search, but the table shows all table data.

class TestPage extends React.Component{
    constructor(){
        super();
        this.state = {dataSet:[
            {"objectName":"sdfsdfsdf33","userId":"cc","perms":["READ","WRITE"],"id":1},
            {"objectName":"3333","userId":"cc","perms":["READ","WRITE"],"id":2},
            {"objectName":"4444sdf","userId":"cc","perms":["READ","WRITE"],"id":3}
        ]
        }
    }

    _onChange(){
        this.setState({dataSet:[
            {"objectName":"newdata","userId":"all","perms":["READ"],"id":1},
            {"objectName":"3333","userId":"cc","perms":["READ","WRITE"],"id":2},
            {"objectName":"4444sdf","userId":"cc","perms":["READ","WRITE"],"id":3}]
        })
    }

    render (){
        console.log("this.state.dataSet", this.state.dataSet);
        return (
            <div className='maxw80 ma'>
                <BootstrapTable data={this.state.dataSet}
                                striped={true} hover={true} condensed={false} search={true} pagination={true}>
                    <TableHeaderColumn className='clgrey' dataField="id" isKey={true} dataAlign="center"
                                       dataSort={true}>#</TableHeaderColumn>
                    <TableHeaderColumn dataField="objectName" dataSort={true}>name</TableHeaderColumn>
                    <TableHeaderColumn dataField="userId" dataSort={true}>userName</TableHeaderColumn>
                    <TableHeaderColumn dataField="perms" dataSort={true}
                                       dataFormat={(cell, row)=>(<span>{cell.toString()}</span>)}>
                        auth
                    </TableHeaderColumn>
                    <TableHeaderColumn dataField="id">
                        op
                    </TableHeaderColumn>
                </BootstrapTable>
                <button onClick={this._onChange.bind(this)}>change-data</button>
            </div>
        )
    }
}

from react-bootstrap-table.

AllenFang avatar AllenFang commented on July 25, 2024

Hi @chuchengcao , sorry for later response. I've fix this problem in v0.9.10. :)

from react-bootstrap-table.

chuchengcao avatar chuchengcao commented on July 25, 2024

Thank you. v0.9.10 fixed the problem, :)

from react-bootstrap-table.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.