MCPcopy Create free account
hub / github.com/adobe/react-spectrum / onSubmit

Function onSubmit

packages/react-aria-components/test/Form.test.js:32–37  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

30 function Test() {
31 let [serverErrors, setServerErrors] = React.useState({});
32 let onSubmit = e => {
33 e.preventDefault();
34 setServerErrors({
35 name: 'Invalid name.'
36 });
37 };
38
39 return (
40 <Form data-testid="form" onSubmit={onSubmit} validationErrors={serverErrors}>

Callers 2

onKeyDownFunction · 0.50
useSearchAutocompleteFunction · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected