Charanor / react-native-highlight-overlay

A tinted overlay that allows one or more elements to be highlighted (non-tinted).
MIT License
41 stars 6 forks source link

Flat list item not clickable #11

Open steavenb opened 2 years ago

steavenb commented 2 years ago

While attempting to display an overlay on a flat list item, I was not able get the click through working. Setting clickthroughHighlight to false lets us trigger the onDismiss method. But if set to true, both the highlighted and non-highlighted part are non-clickable. I did not place the HighlightOverlay inside the parent ScrollView which holds the Flatlist since there were positioning issues. Placing it outside let me position it perfectly.

In the HighlightOverlay.tsx file, if I change the parent View's pointerEvents to "none", it allows click of all components beneath the overlay. But this would mean that onDismiss will not be called.

Is there something that I am missing?