Half-assed, failed attempt at a native search box using "react-search-box"

This commit is contained in:
Ray 2023-11-16 15:42:14 +00:00 committed by GitHub
parent de57405515
commit 0b131a3b64
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 38 additions and 0 deletions

View File

@ -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)}
/>
);
}
}