AbdullahQureshi1080 / superforms-rn

Super forms using formik and yup in react-native with built-in ready to use form components that are customizable
https://www.npmjs.com/package/@superforms/superforms-rn
MIT License
3 stars 0 forks source link

In Common Field prop disabled don't work. #13

Closed SpringSan closed 1 year ago

SpringSan commented 1 year ago

Describe the bug I follow the example. The prop disabled is true. But I can input in this field.

To Reproduce <FormField name="fullName" label="Full Name" disabled={true} /> Expected behavior

Screenshots 微信图片_20221114131849

Smartphone (please complete the following information):

Additional context Add any other context about the problem here.

AbdullahQureshi1080 commented 1 year ago

@SpringSan Can you tell me which version you're using? Is it the latest?

SpringSan commented 1 year ago

"react": "18.1.0", "react-native": "0.70.2", "@superforms/superforms-rn": "^1.1.0",

AbdullahQureshi1080 commented 1 year ago

@SpringSan will look into the issue as soon as I find some time, a quick thing you can try is to use the editable={false} on the <FormField editable={false}/> component and see if that helps.

Also it seems try to have disabled={false}and see if that works, I mapped the disabled directly to the <TextInput/> component so by default disabled={true} means that field is editable while disabled={false} means that it's not, it's a logical issue, thanks for pointing it out will fix this in the upcoming versions.

Let me know if this works.

SpringSan commented 1 year ago

🤝