You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I’m trying out Forms with react-hook-forms and I would like the clarify the behaviour of fullWdith property in LmInputRhf.
Currently, I wish to stretch the input form to the end of the screen. Using the fullWidth prop causes the input to actually overflow the screen. This is not just for iPhone simulator screens, but also for larger devices like iPad. Screenshot attached below:
I am currently following one of the snippets With Tamagui Form 2.
I have tried adding YStack with padding but the issue still persists. Code snippet for the above screenshot:
importReactfrom'react';import{Stack,XStack,Paragraph,Form,YStack}from'tamagui';import{LmInputRhf}from'@tamagui-extras/form';import{LmAlert,LmButton}from'@tamagui-extras/core';import{useForm}from'react-hook-form';
export defaultfunctionTripForm(): React.JSX.Element{const{ control, handleSubmit, reset }=useForm({defaultValues: {name: '',email: undefined,password: undefined,},});return(<YStackfullscreenpadding="$4"><Formgap={'$3'}onSubmit={handleSubmit((data)=>{console.log(data);})}><LmAlertseverity={'info'}outlinedtext='You can use `useForm` directly from "react-hook-form"'></LmAlert><LmInputRhfname={'name'}control={control}label={'Name'}placeholder={'Type your name...'}labelInlinerequiredfullWidth/><LmInputRhfname={'email'}control={control}label={'Name'}placeholder={'Type your email...'}labelInline/><LmInputRhfname={'password'}control={control}label={'Password'}isPasswordplaceholder={'Your password...'}labelInline/><XStackgap={'$3'}><LmButtononPress={()=>reset()}>Reset</LmButton><Form.TriggerasChild><LmButtoncolorVariant={'primary'}>Submit</LmButton></Form.Trigger></XStack></Form></YStack>);}
Thanks!
The text was updated successfully, but these errors were encountered:
Hi,
I’m trying out Forms with react-hook-forms and I would like the clarify the behaviour of
fullWdith
property inLmInputRhf
.Currently, I wish to stretch the input form to the end of the screen. Using the
fullWidth
prop causes the input to actually overflow the screen. This is not just for iPhone simulator screens, but also for larger devices like iPad. Screenshot attached below:I am currently following one of the snippets
With Tamagui Form 2
.I have tried adding
YStack
withpadding
but the issue still persists. Code snippet for the above screenshot:Thanks!
The text was updated successfully, but these errors were encountered: