material-ui-submit-field
v0.1.1
Published
A text input field which allows enter keypress actions using Material-UI.
Downloads
4
Maintainers
Readme
Material UI Submit Field
This is a text field that allows the execution of a function when the user presses the enter key. It is highly customizable and allows all of the options of a TextField from Material-UI.
Installation
npm install --save material-ui-submit-field
Usage
An example of a enter text field that alerts the user:
import EnterTextField from 'material-ui-submit-field';
<EnterTextField
onEnterKeyPress={() => this.props.alertUser()} />
Obviously, you can use this without the ES6 syntax.
Note that all properties are forwarded to the TextField by default, so anything that is useful on the material text field can be used here as well.
The only properties that are intercepted are these:
| Property | Type | Description | Required |
| ----- | ---- | ---- | ---- |
| onEnterKeyPress | function
| Callback for user pressing the enter key | true
|
Small Print
License
Material UI Submit Field
is released under the MIT license.
Author
Mark Katerberg (@diablomarcus)