akveo / react-native-ui-kitten

:boom: React Native UI Library based on Eva Design System :new_moon_with_face::sparkles:Dark Mode
https://akveo.github.io/react-native-ui-kitten/
MIT License
10.27k stars 951 forks source link

Select with List - measureLayoutRelativeToContainingList threw an error #1258

Closed Dammic closed 3 years ago

Dammic commented 3 years ago

šŸ› Bug Report

We've recently updated to react-native https://github.com/expo/react-native/archive/sdk-39.0.2.tar.gz with expo sdk 39.0.2 and react-native-web 0.13.14. There seems to be a problem with virtualization of the 'List' component, it is shown with on the screenshot. I don't see it having any impact on functionality, though we don't really use virtualization heavily.

This might not be the common usage, though it was working properly in the previous version of react-native-web (^0.11). I'm not sure if this behaviour is limited to Select or it's just a list.

The error is as follows:

 measureLayoutRelativeToContainingList threw an error TypeError: this.context.virtualizedList.getOutermostParentListRef(...).getScrollRef(...).getNativeScrollRef is not a function
    at VirtualizedList.measureLayoutRelativeToContainingList (webpack-internal:///./node_modules/react-native-web/dist/vendor/react-native/VirtualizedList/index.js:1132:109)
    at VirtualizedList._this._onLayout (webpack-internal:///./node_modules/react-native-web/dist/vendor/react-native/VirtualizedList/index.js:406:15)
    at eval (webpack-internal:///./node_modules/react-native-web/dist/hooks/useElementLayout.js:43:15)
    at eval (webpack-internal:///./node_modules/react-native-web/dist/exports/UIManager/index.js:41:7)

To Reproduce

Steps to reproduce the behavior: 1) use Select with List as list of options 2) open the options selection - the console will show a warning

Expected behavior

No warning is shown (possible underlying issue is fixed)

Link to runnable example or repository (highly encouraged)

https://snack.expo.io/@damian.michalski/playground (check logs)

UI Kitten and Eva version

Package Version
@eva-design/eva 2.0.0
@ui-kitten/components 5.0.0

Environment information

  System:
    OS: Linux 5.6 Linux Mint 19 (Tara)
    CPU: (8) x64 Intel(R) Core(TM) i7-8565U CPU @ 1.80GHz
  Binaries:
    Node: 12.18.3 - ~/.nvm/versions/node/v12.18.3/bin/node
    Yarn: 1.22.4 - ~/.nvm/versions/node/v12.18.3/bin/yarn
    npm: 6.14.6 - ~/.nvm/versions/node/v12.18.3/bin/npm
Dammic commented 3 years ago

Any news on that? I've checked, and rendering just the List (even FlatList) doesn't cause this issue, so it's only the pairing of list with this component that causes this

ianmartorell commented 3 years ago

We're running into this as well, and it seems to be a problem about rendering nested FlatLists, unrelated to UI Kitten. Maybe we should open an issue for React Native Web?

whitestranger7 commented 3 years ago

Hi! Regarding some investigations, I could say that the issue definitely related to RN-web thread right there. Looks like it was fixed already, but the issue still exist on 39 and 40 sdk version. There's nothing we can do from UI Kitten side, so Im closing the issue.