Comments (8)
Just fixed my previous comment, looks like GitHub markdown was eating some of the < />
tags... hopefully it should make a bit more sense now! Basically it seems like <TouchableHighlight />
isn't firing off the onPressOut callback to un-highlight the row when you mess with the children of the <Section>
presumably because somethings getting unmounted midpress? Not sure.
And I can definitely see the same issue on my iOS simulator, it's where I first noticed it. Let me try re-running that snack on my device though.
Edit: Yep, its still missing there.
from react-native-tableview-simple.
Good to hear!
Feel free to close this issue if it works for you now π
from react-native-tableview-simple.
Hi @philo23!
Glad that you like it!
That's an interesting issue. Could be something with this rows: https://github.com/Purii/react-native-tableview-simple/blob/master/src/components/Section.tsx#L128-L140
It may take some time before I can take a closer look. If you find a solution in the meantime feel free to open a PR π
from react-native-tableview-simple.
So I've done a little digging and it seems like highlightedRowIndex
isn't getting reset back to undefined by unhighlightRow
because the onPressOut
callback isn't being fired from the <TouchableHighlight>
used inside of the <Cell>
component.
It's almost like <TouchableHighlight>
is being unmounted or something before it gets a chance to call the onPressOut callback? but I'm not sure because that doesn't seem like it should work like that.
At first I thought it might be this line,
or line 66 because highlightedRowIndex could be set to index 0 or 1, but as far as I can tell it's not actually that. Though I'd be curious to find out why those checks are in there.from react-native-tableview-simple.
Yep. Just saw that.
Happened on my rewrite to TS... but that's not released yet.
Tried to verify the issue with a local simulator. But there it works?
from react-native-tableview-simple.
Seems to be some kind of race condition.
For me it works with the Snack and locally...
Looks like component doesn't get rerendered if the children change.
The Touchable
triggers an update of highlightedRowIndex
which leads to a serenader of the Section
. That's why it works after pressing the Touchable
Component.
Section:127-132
controls the rendering of the Separator. Could you try out to debug the conditions?
Edit: Just released v3.0.0
with the TS
Component. Best you update, so we have the same version.
from react-native-tableview-simple.
Great, I was just about to ask what the best way to try out the new TS version. I'll test out v3.0.0 now and let you know how it goes.
from react-native-tableview-simple.
I've updated it and it appears to be working now in-simulator, but I think the actual issue might have been that my react-native dependency was actually out of date by a couple of minor versions π
Weirdly the snack from earlier still seems to be broken even with the new v3 version... but I think this bug can probably be put down to something in React Native thats since been fixed!
from react-native-tableview-simple.
Related Issues (20)
- Setting custom colors for `<Seperator>`s HOT 9
- YellowBox warning when using a FlatList in a ScrollView HOT 4
- DisclosureIndicator is different HOT 2
- insetLeft, insetRight issue on Separator component HOT 2
- Use it as static tableview form
- Not possible to use themes with FlatList
- Support new iOS 14 Style HOT 1
- Bug in dark mode display HOT 4
- Support editing mode HOT 1
- Feature request: New input style HOT 3
- Π‘an I change padding inside Π‘ell? HOT 1
- Can't use other props when cellContentView is used HOT 1
- An in-range update of eslint-plugin-react is breaking the build π¨ HOT 2
- Non-integer device scaling causing issues with <Separator> hairline widths HOT 3
- Can't seem to make the detail prop work. HOT 1
- implement testID HOT 2
- Support Rounded Sections HOT 3
- Cell with Text Input Eats Touchable Press When Blurring HOT 2
- An in-range update of eslint is breaking the build π¨ HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-native-tableview-simple.