deanmcpherson / deanmcpherson/react-native-sortable-listview
getScrollResponder is not a function
- Dominant language
- JavaScript
- Stars
- 909
- Forks
- 225
- PR merge metrics
- No merged PRs in 30d
Description
When running a snapshot test wit jest on a component using the `SortableListView`, I get following error:
```
node_modules/react-native-sortable-listview/index.js:186
_this3.scrollResponder=_this3.refs.list.getScrollResponder();
^
TypeError: _this3.refs.list.getScrollResponder is not a function
at null._onTimeout (node_modules/react-native-sortable-listview/index.js:186:41)
at Timer.listOnTimeout (timers.js:92:15)
npm ERR! Test failed. See above for more details.
```
When I look into the `refs.list`, indeed the getScrollResponder() doesn't exits.
I run react native 0.42.3
And version 0.2.2 of this module
Is there something special I should do with snapshot tests? I followed the example.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reproducing the snapshot test with React Native 0.42.3 and module version 0.2.2, then inspect node_modules/react-native-sortable-listview/index.js around line 186 and the SortableListView ref. Confirm that the snapshot test completes without the getScrollResponder error and that its expected snapshot remains valid.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, react-native
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100