Skip to content

Commit 6df8a03

Browse files
authored
fix: snapTo responding only after calling twice (#206)
1 parent 549c153 commit 6df8a03

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/index.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -683,11 +683,12 @@ export default class BottomSheetBehavior extends React.Component<Props, State> {
683683
if (!this.props.enabledImperativeSnapping) {
684684
return
685685
}
686+
687+
this.isManuallySetValue.setValue(1)
686688
this.manuallySetValue.setValue(
687689
// @ts-ignore
688690
this.state.snapPoints[this.state.propsToNewIndices[index]]
689691
)
690-
this.isManuallySetValue.setValue(1)
691692
}
692693

693694
private height: Animated.Value<number> = new Value(0)

0 commit comments

Comments
 (0)