NativeBase
NativeBase copied to clipboard
input is not disabled when wrapped in formcontrol
No### Description
I expect the input to be disabled when wrapped in a formcontrol
Steps to reproduce
project with dependencies
"native-base": "^3.4.16",
"react": "18.2.0",
"react-hook-form": "^7.43.5",
"react-native": "0.71.0",
"react-native-safe-area-context": "^3.3.2",
nodejs v18.14.2 macos ventura 13.2.1
NativeBase Version
3.4.16
Platform
- [x] Android
- [x] iOS
+1. When select is wrap with forum on android, it also isn't disabled.
+1. Quando o select é agrupado com o fórum no Android, ele também não é desativado.
I got around this with isReaonly and isDisabled at the same time
Thanks. I got a work around with isReadOnly on forumcontrol that solves the problem that select is editable on android when wrapped with forumcontrol
This is indeed an issue on Android. Works fine on iOS. I should not have to make the FormControl readOnly in order to get this to work on Android only.
Doesn't work:
<FormControl>
<Select
....
/>
</FormControl>
When pressing the select input:

Works:
<FormControl isReadOnly>
<Select
....
/>
</FormControl>
When pressing the select input:

@JeroenSchrader on ios it didn't work for me
This is indeed an issue on Android. Works fine on iOS. I should not have to make the FormControl readOnly in order to get this to work on Android only.
Doesn't work:
<FormControl> <Select .... /> </FormControl>When pressing the select input:
Works:
<FormControl isReadOnly> <Select .... /> </FormControl>When pressing the select input:
It worked for me in android, did not get to test in IOS.
worked for me in iOS too
its working fine like this Nativebase latest version
<FormControl style={styles.input} isReadOnly={true} isInvalid={'buildingNoError' in errors}> <FormControl.Label>Flat/Shop No</FormControl.Label> <Input type='text' value={unitDetails?.flat_shop_no} /> {'buildingNoError' in errors ? <FormControl.ErrorMessage>{errors.buildingNoError}</FormControl.ErrorMessage> : '' } </FormControl>