Skip to content
This repository has been archived by the owner on Feb 12, 2018. It is now read-only.

scienceai/capture-submit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

capture-submit

THIS IS NO LONGER MAINTAINED USE @scienceai/ui INSTEAD

styled with prettier

React higher order component that calls a onSubmit callback on blur, pressing enter etc...

import CaptureSubmit from 'capture-submit';
import PaperInput from 'paper-input';

const ControlledPaperInput = CaptureSubmit(PaperInput);

...


<ControlledPaperInput
 type="text"
 name="name"
 label="name"
 value="value"
 onSubmit={(e) => { console.log('submission! (blur, enter is pressed etc..')}}
/>

capture-submit will do the right thing for select input and textarea (see sources).

About

React higher order component that calls a onSubmit callback on blur, pressing enter etc...

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published