@vagnerzadoque/vagnerlib
v1.1.10
Published
Componente de Pesquisa Genérico
Downloads
15
Readme
SimpleSearch / Component React
Componente de Pesquisa Genérico
Import SimpleSearch
import { SimpleSearch } from '@vagnerzadoque/vagnerlib';
Example implements
this ref at forwardRef
const Mref = useRef(null)
const handleSearch = (selectLabel) => {
console.log(selecLabel.value)
console.log(selecLabel.label)
console.log(Mref.current.value)
}
<SimpleSearch
ref={Mref}
fields={[
{ label: "Nome", value: "name" },
{ label: "CPF", value: "cpf" },
]}
handleSearch={handleSearch}
placeholder={"Pesquisa"}
></SimpleSearch>
Install
example:
npm i @vagnerzadoque/vagnerlib