Half-assed, failed attempt at a native search box using "react-search-box"
This commit is contained in:
parent
de57405515
commit
0b131a3b64
|
@ -0,0 +1,38 @@
|
|||
import React, { Component } from "react";
|
||||
import ReactSearchBox from "react-search-box";
|
||||
|
||||
export default class App extends Component {
|
||||
data = [
|
||||
{
|
||||
key: "john",
|
||||
value: "John Doe",
|
||||
},
|
||||
{
|
||||
key: "jane",
|
||||
value: "Jane Doe",
|
||||
},
|
||||
{
|
||||
key: "mary",
|
||||
value: "Mary Phillips",
|
||||
},
|
||||
{
|
||||
key: "robert",
|
||||
value: "Robert",
|
||||
},
|
||||
{
|
||||
key: "karius",
|
||||
value: "Karius",
|
||||
},
|
||||
];
|
||||
|
||||
render() {
|
||||
return (
|
||||
<ReactSearchBox
|
||||
placeholder="Search book collection"
|
||||
value="Book"
|
||||
data={book.data}
|
||||
callback={(record) => console.log(record)}
|
||||
/>
|
||||
);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue