You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Typescript error: Property scrollToOffset does not exist on type SwipeListView<MyType> where the object is the ref parameter in the listViewRef function.
let listViewRef: SwipeListView<MyType> | null = null;
<SwipeListView
...
listViewRef={(ref) => {
// type of ref is SwipeListView as defined here https://github.com/jemise111/react-native-swipe-list-view/blob/master/types/index.d.ts#L395
listViewRef = ref;
}}
/>
...
// This works fine at runtime. Typescript is showing an error that scrollToOffset does not exist
listViewRef?.scrollToOffset({
x: 0,
y: 0,
animated: true,
});
Environment:
OS: Mac using Expo, testing on iOS simulator
RNSLV Version: 3.1.0
RN Version: 0.61
The text was updated successfully, but these errors were encountered:
@ccannell I don't use typescript often, I'm not exactly sure how to fix this one. AFAIK SwipeListView should be extending FlatListProps which should contain the scrollToOffset function, no? Any suggestions would be awesome
Describe the bug
Typescript error: Property
scrollToOffset
does not exist on typeSwipeListView<MyType>
where the object is theref
parameter in thelistViewRef
function.Environment:
The text was updated successfully, but these errors were encountered: