Skip to content

Commit

Permalink
feat: Update TextInput logic to readOnly take priority over editable
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrieldonadel committed Aug 18, 2022
1 parent a07a65c commit 1284786
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Libraries/Components/TextInput/TextInput.js
Original file line number Diff line number Diff line change
Expand Up @@ -1388,7 +1388,8 @@ const ExportedForwardRef: React.AbstractComponent<
allowFontScaling = true,
rejectResponderTermination = true,
underlineColorAndroid = 'transparent',
readOnly = false,
readOnly,
editable,
...restProps
},
forwardedRef: ReactRefSetter<
Expand All @@ -1400,7 +1401,7 @@ const ExportedForwardRef: React.AbstractComponent<
allowFontScaling={allowFontScaling}
rejectResponderTermination={rejectResponderTermination}
underlineColorAndroid={underlineColorAndroid}
editable={!readOnly}
editable={readOnly !== undefined ? !readOnly : editable}
{...restProps}
forwardedRef={forwardedRef}
/>
Expand Down

0 comments on commit 1284786

Please sign in to comment.