THIS IS NO LONGER MAINTAINED USE @scienceai/ui INSTEAD
React higher order component that calls a onSubmit callback on blur, pressing enter etc...
importCaptureSubmitfrom'capture-submit';importPaperInputfrom'paper-input';constControlledPaperInput=CaptureSubmit(PaperInput);
...
<ControlledPaperInputtype="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).