Skip to content

Commit 9165f47

Browse files
Saadnajmitido64
andauthored
Update RCTWrappedTextView.m
Co-authored-by: Tommy Nguyen <[email protected]>
1 parent 11ab6cd commit 9165f47

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

packages/react-native/Libraries/Text/TextInput/Multiline/RCTWrappedTextView.m

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -144,13 +144,8 @@ - (BOOL)scrollEnabled
144144

145145
- (void)setScrollEnabled:(BOOL)scrollEnabled
146146
{
147-
if (scrollEnabled) {
148-
_scrollView.scrollEnabled = YES;
149-
[_clipView setConstrainScrolling:NO];
150-
} else {
151-
_scrollView.scrollEnabled = NO;
152-
[_clipView setConstrainScrolling:YES];
153-
}
147+
_scrollView.scrollEnabled = scrollEnabled;
148+
[_clipView setConstrainScrolling:!scrollEnabled];
154149
}
155150

156151
- (BOOL)shouldShowVerticalScrollbar

0 commit comments

Comments
 (0)