Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

use-email-autocomplete

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

use-email-autocomplete - npm Package Compare versions

Comparing version 1.0.4 to 1.0.5

2

package.json
{
"name": "use-email-autocomplete",
"version": "1.0.4",
"version": "1.0.5",
"homepage": "https://codepen.io/alex-cory/pen/daLjKj?editors=0010",

@@ -5,0 +5,0 @@ "github": "https://github.com/alex-cory/use-email-autocomplete",

@@ -37,3 +37,3 @@ # Email Autocomplete Hook

This should work with all other libraries including `material-ui` and others.
This should work with other libraries including `material-ui`.
Play with it [here](https://alex-cory.github.io/email-autocomplete-input/)!

@@ -64,4 +64,37 @@

Custom Autocomplete Input
-------------------------
```jsx
export const EmailInput = ({ onChange, ...props }) => {
const { email, onChange: handleEmailChange, bind } = useEmailAutocomplete()
const handleChange = e => {
handleEmailChange(e)
onChange(email)
}
return <input {...bind} {...props} onChange={handleChange} value={email} />
}
```
Usage with Material UI
----------------------
Requires `@material-ui/core: 4.0.0` and above.
```jsx
import { TextField } from '@material-ui/core'
export const EmailInput = ({ onChange, ...props }) => {
const { email, onChange: handleEmailChange, bind } = useEmailAutocomplete()
const handleChange = e => {
handleEmailChange(e)
onChange(email)
}
return <TextField {...bind} {...props} onChange={handleChange} value={email} />
}
```
### Examples
- Codesandbox (coming soon... codesandbox is messing up saying I have >50 sandboxes even though I don't...)
- [Codesandbox](https://codesandbox.io/s/useemailautocomplete-material-ui-j5m1x)

@@ -68,0 +101,0 @@ Options

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc