diff --git a/README.md b/README.md index e7ff13c..9a82c9f 100644 --- a/README.md +++ b/README.md @@ -27,7 +27,7 @@ Simple form library for React Native with great UX for developer and end-user ap - Email, username, password, number, numberText, decimal, decimalText, - Great typescript support! - Nested object with dot notation -- Nested forms +- ~~Nested forms~~ (don't work well yet) - Great decimal support with support for , notation and automatically convert it to a Number object See a demo: https://twitter.com/RichardLindhout/status/1344009881863516165 diff --git a/example/src/App.tsx b/example/src/App.tsx index 94a4ff0..e76b285 100644 --- a/example/src/App.tsx +++ b/example/src/App.tsx @@ -8,7 +8,7 @@ import { Form, useFormState, } from 'react-native-use-form'; -import { Appbar, Button, Surface, Text, Title } from 'react-native-paper'; +import { Appbar, Button, Text } from 'react-native-paper'; import TextInputWithError from './TextInputWithError'; import { useRef } from 'react'; import { SafeAreaProvider } from 'react-native-safe-area-context'; @@ -30,7 +30,9 @@ type FormType = { password: string; age: number | undefined; money: number | undefined; + description: string | undefined; postalCode: string | undefined; + postalCodeDisabled: string | undefined; organization: { name: string; telephone: string; @@ -52,9 +54,11 @@ export default function App() { email: '', telephone: '', password: '', - age: 0, - money: 0, + age: undefined, + money: undefined, + description: '', postalCode: '', + postalCodeDisabled: '', organization: { name: '', telephone: '', @@ -135,6 +139,16 @@ export default function App() { label: 'Postalcode', })} /> + { + return (v || '').toUpperCase(); + }, + label: 'Postalcode (disabled)', + })} + /> - - + + {/**/} + {/**/}