Skip to content

Commit

Permalink
Adding onLongPress to ListItem and propagating it down to the Touchab…
Browse files Browse the repository at this point in the history
…leHighlight. (#1533)
  • Loading branch information
Zunder authored and paranoidjk committed Jul 13, 2017
1 parent 5ada1f3 commit 2a852d9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion components/list/ListItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export default class Item extends React.Component<ListItemProps, any> {
render() {
const {
styles, children, multipleLine, thumb, extra, arrow, style, onClick,
onPressIn, onPressOut, wrap, disabled, align, ...restProps,
onPressIn, onPressOut, onLongPress, wrap, disabled, align, ...restProps,
} = this.props;
const itemStyles = styles!; // assert none-null none-undefined

Expand Down Expand Up @@ -160,6 +160,7 @@ export default class Item extends React.Component<ListItemProps, any> {
onPress={onClick ? onClick : undefined}
onPressIn={onPressIn}
onPressOut={onPressOut}
onLongPress={onLongPress}
>
{itemView}
</TouchableHighlight>
Expand Down
1 change: 1 addition & 0 deletions components/list/PropsType.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ export interface ListItemProps {
};
onPressIn?: () => void;
onPressOut?: () => void;
onLongPress?: () => void;
}

export interface BriefProps {
Expand Down

0 comments on commit 2a852d9

Please sign in to comment.