Comments (16)
Even if I rendered the RecyclerListView after I load the data. I'd still have to imperatively scroll to the desired index, which will break because of #44. Thanks for the suggestion though.
from recyclerlistview.
I think the following line suffers from the same issue (I also get an exception because this._virtualRenderer is null):
from recyclerlistview.
This usually sometimes happens on dev mode where the time to mount is huge. Never saw in prod mode. If you have a fix can you raise a PR otherwise we'll pick it up when we have time available.
from recyclerlistview.
And thanks for the feedback, really appreciate it!
from recyclerlistview.
I'm seeing the same error when I try to call scrollToIndex
in my componentDidMount
lifecycle hook. The problem, as far as I could investigate, is that _initTrackers
is not called until _onSizeChanged
is called.
@naqvitalha Could you elaborate?
from recyclerlistview.
@abdallamohamed You are right, it's not safe to call it in componentDidMount because initialisation might not have happened. But for your specific use case I think you can specify initialRenderIndex
. It was designed for such use cases.
from recyclerlistview.
@naqvitalha that was my first approach but because I'm fetching data from an API, the scroll position is lost. That's the same issue here #44
from recyclerlistview.
Why don't you render RecyclerListView once you have the data? Get data and create data source post that render RecyclerListView with initialRenderIndex. For initialRenderIndex to work you need data to be present. Anyways, can you elaborate on the use case so that I can assist better?
from recyclerlistview.
@peterjuras Have raised a PR to fix this issue #46 . Tested on your sample as well. Can you once go through and verify if it fixes the issues you encountered. We will then publish the package.
from recyclerlistview.
@abdallamohamed scrollToIndex will still fail if called before mounting. I believe that's the way it should be and currently we don't have a workaround. I will put a null check though.
from recyclerlistview.
@naqvitalha Yeah. I put a setTimeout
as a workaround. I think it all comes to maintaining the scroll position as new items are added to the list. Then there would be no need to call scrollToIndex
, because we already haveinitialRenderIndex
from recyclerlistview.
@abdallamohamed Interested in seeing what you're building. Anyway to take a look?
from recyclerlistview.
Fixed in #46
from recyclerlistview.
Sorry for the late response, I can confirm that the fix resolves the issue.
However, you should check out #47 since it might affect new users.
from recyclerlistview.
@naqvitalha can you share your email so I could share the details with you? I tried sending an email to [email protected] but Gmail fails to deliver my mails.
from recyclerlistview.
[email protected] is public now... it should be working... can you try now? If it doesn't please DM me on twitter.. I'll pass on the email there.
from recyclerlistview.
Related Issues (20)
- forceNonDeterministicRendering is not working when using different View_Types
- The focused row index is different from onVisibleIndicesChanged HOT 1
- Support for multiple viewability config
- 🅱️ Horizontal List Bug (Layout Problem for height not updated correctly) HOT 1
- `testID` & `accessibilityLabel` properties are not supported on recyclerlistview and it's elements?
- numColumns BUG HOT 5
- can not hide the scroll bar HOT 1
- Internal length of list? HOT 1
- compile error
- Recycerlistview renderItem function is rendering half of the item
- How can i render kind of skeleton placeholder items instead of whitespaces/blank?
- TouchableHighlight object inside a RecyclerListView Losing Focus on fast key navigation with React Native TVOS
- How can I interact with the latest selected row?
- Glitch issue when use ScrollViewWithHeader with GridLayoutProvider HOT 1
- useBottomSheetDynamicSnapPoints is deprecated
- Somebody help me!!! /core/RecyclerListView.js: Property id of VariableDeclarator expected node to be of a type ["LVal"] but instead got "BooleanLiteral" HOT 2
- npm run build is failing HOT 3
- Web accessibility: focus order is wrong.
- contextProvider offset does not work in apps with StrictMode enabled
- New architecture support HOT 1
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 recyclerlistview.