iamshaunjp / iamshaunjp/react-native-tutorial

TouchableWithoutFeedback component breaks FlatList scrolling...

Đang mở
#6 3 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Không có dữ liệu ngôn ngữ
Star
605
Fork
499
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

after the App.js views are wrapped in the TouchableWithoutFeedback component, if the list becomes longer than the Item container for the FlatList, scrolling breaks...

I fixed it by wrapping the ToDoItem component in another **TouchableWithoutFeedback**, which makes the items 'touchable' again, allowing them to scroll...

```
export default function ToDoItem ({ item, pressHandler }) {

return (

****

{item.text}

pressHandler(item.id)}>
Done

{/* pressHandler(item.id)}/> */}


****


)
}
```

However, if a user tries scrolling from the "list" view (pressing 'between' two items to scroll), then scrolling is still disabled. I havent been able to figure out how to fix that, except for minimizing the 'marginTop' style for the items (bringing them closer together)...

Any ideas on how to make *any* press within the App.js list view?

I tried wrapping it in another Touchable component, as well as adding a 'onStartShouldSetResponder' prop to the 'list' View, both unsuccessfully...

from App.js
```
{
if (isKeyboardVisible) {
Keyboard.dismiss();
console.log('keyboard dismissed');
}
}}
accessible={false}>

{/* {header} */}


{/* {add todo form} */}

{}}>
true}
style={styles.list}>
{/* {todo list items} */}
(

)}
/>





```

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.