We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b99816c commit 1ac7fe6Copy full SHA for 1ac7fe6
src/index.tsx
@@ -695,8 +695,16 @@ export class ScrollBottomSheet<T extends any> extends Component<Props<T>> {
695
const { method, args } = imperativeScrollOptions[
696
this.props.componentType
697
];
698
- // @ts-ignore
699
- this.props.innerRef.current?.getNode()[method](args);
+ if (
+ (this.props.componentType === 'FlatList' &&
700
+ (this.props?.data?.length || 0) > 0) ||
701
+ (this.props.componentType === 'SectionList' &&
702
+ this.props.sections.length > 0) ||
703
+ this.props.componentType === 'ScrollView'
704
+ ) {
705
+ // @ts-ignore
706
+ this.props.innerRef.current?.getNode()[method](args);
707
+ }
708
})
709
),
710
set(this.dragY, 0),
0 commit comments