Skip to content

Commit

Permalink
fix: simplify demo
Browse files Browse the repository at this point in the history
  • Loading branch information
RichardLindhout committed Jan 16, 2025
1 parent dcc1048 commit 1136a2c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
4 changes: 2 additions & 2 deletions example/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export default function App() {
const [locale, setLocale] = React.useState<Language>(Language.EN);
const [hideRequiredField, setHideRequiredField] = React.useState(false);
const scrollViewRef = useRef<ScrollView>(null);
const [{ submit, formProps, hasError }, fh] = useFormState<FormType>(
const [{ submit, formProps }, fh] = useFormState<FormType>(
{
email: '',
telephone: '',
Expand Down Expand Up @@ -107,8 +107,8 @@ export default function App() {
<Form {...formProps}>
<TextInputWithError
mode="outlined"
error={hasError('email')}
{...fh.email('email', {
required: true,
validate: (v) => {
return looksLikeMail(v) ? true : 'Email-address is invalid';
},
Expand Down
1 change: 0 additions & 1 deletion example/src/TextInputWithError.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ function TextInputWithError(
},
ref: any
) {
console.log('render', rest.label);
return (
<>
{/*// @ts-ignore*/}
Expand Down

0 comments on commit 1136a2c

Please sign in to comment.