Skip to content

Commit 1284786

Browse files
feat: Update TextInput logic to readOnly take priority over editable
1 parent a07a65c commit 1284786

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Libraries/Components/TextInput/TextInput.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1388,7 +1388,8 @@ const ExportedForwardRef: React.AbstractComponent<
13881388
allowFontScaling = true,
13891389
rejectResponderTermination = true,
13901390
underlineColorAndroid = 'transparent',
1391-
readOnly = false,
1391+
readOnly,
1392+
editable,
13921393
...restProps
13931394
},
13941395
forwardedRef: ReactRefSetter<
@@ -1400,7 +1401,7 @@ const ExportedForwardRef: React.AbstractComponent<
14001401
allowFontScaling={allowFontScaling}
14011402
rejectResponderTermination={rejectResponderTermination}
14021403
underlineColorAndroid={underlineColorAndroid}
1403-
editable={!readOnly}
1404+
editable={readOnly !== undefined ? !readOnly : editable}
14041405
{...restProps}
14051406
forwardedRef={forwardedRef}
14061407
/>

0 commit comments

Comments
 (0)