capture-submit

1.0.3 • Public • Published

capture-submit

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).

/capture-submit/

    Package Sidebar

    Install

    npm i capture-submit

    Weekly Downloads

    4

    Version

    1.0.3

    License

    Apache-2.0

    Last publish

    Collaborators

    • scienceai