-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[RN] Optional use TouchableWithoutFeedback component in Flex/FlexItem component #2095
[RN] Optional use TouchableWithoutFeedback component in Flex/FlexItem component #2095
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2095 +/- ##
==========================================
+ Coverage 58.1% 58.19% +0.08%
==========================================
Files 253 253
Lines 4399 4437 +38
Branches 1156 1174 +18
==========================================
+ Hits 2556 2582 +26
- Misses 1842 1854 +12
Partials 1 1
Continue to review full report at Codecov.
|
+1 |
components/flex/FlexItem.native.tsx
Outdated
@@ -10,23 +10,42 @@ export interface FlexItemProps extends BasePropsType { | |||
onPressOut?: any; | |||
} | |||
|
|||
export default class FlexItem extends React.Component<FlexItemProps, any> { | |||
export default class FlexItem extends React.Component < FlexItemProps, any > { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no need blank
components/flex/FlexItem.native.tsx
Outdated
static defaultProps = { | ||
flex: 1, | ||
}; | ||
render() { | ||
let { style, children, flex, ...restProps } = this.props; | ||
let { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
recommend: no need wrap within 100 columns
ping @fengliu222 |
@paranoidjk I will fix in few hours. |
@paranoidjk Fixed, pls review. |
This is not a break change and can be released in next version. |
ant-design#2095) * Enhancement:[RN] Remove TouchableWithoutFeedback wrapper in `flexItem` and `flex` component
relate issues: #1108, #769
Flex
andFlexItem
now have capability to switch thatTouchableWithoutFeedback
wrap or not.When developer pass one of
onPress
onLongPress
onPressIn
onPressOut
parameter, theFlex
component will be wrapped byTouchableWithoutFeedback
.This solution avoid make a break change to developer.
This change is