Mobius1/Selectr

Multiple select box in Reactjs

Closed this issue · 0 comments

Hey!
I've been trying to integrate Selectr in my React application that I created using create-react-app.

This is what my code looks like:

`componentDidMount() {

    var d = new Selectr("#mytest", {
        data: [
            { value: 'foo', text: 'Foo' },
            { value: 'bar', text: 'Bar' },
            { value: 'baz', text: 'Baz' },
          ]
    });
    
}
render() {
    return (
        <div className="card">
            <select id="mytest"></select>
        </div>
    );
}`

When I start the application, it displays two select boxes!