Skip to content
This repository has been archived by the owner on Apr 16, 2024. It is now read-only.

katerberg/material-ui-submit-field

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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)

About

A text input field which allows enter keypress actions using Material-UI

Resources

Stars

Watchers

Forks

Packages

No packages published