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

Function onSubmit

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

Source from the content-addressed store, hash-verified

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

Callers 2

useSearchFieldFunction · 0.50
useSearchAutocompleteFunction · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected