SnapTo works only on double click
See original GitHub issueIssue:
I am using the Notification Panel example for one of my projects. I am trying to snap the panel to the initial state when we click on the close button. This works when I double click the button but the single click is not triggering the action.
Code:
...other code
export default class App extends Component {
notif = React.createRef()
render() {
return (
<View style={styles.container}>
...other code
<Interactable.View
ref={this.notif}
verticalOnly={true}
snapPoints={[
{ y: 0, tension: 0, damping: 1 },
{ y: -Screen.height + 80 },
]}>
...other code
<Button title="Close" onPress={() => this.notif.current.snapTo({index: 1})} ></Button>
</Interactable.View>
}
}
...other code
FYI-- I was doing double click during the last few seconds where the panel goes to correct snap.
Let me know if I am doing something wrong.
Issue Analytics
- State:
- Created 4 years ago
- Comments:6
Top Results From Across the Web
Turn the snap to grid and snap to object options on or off in ...
To snap shapes or other objects to grid lines that go through the vertical and horizontal edges of other shapes or objects, click...
Read more ><a> tag only working on double click and not single click
Well, first of all, this works on 2nd click, not on double click . Next,. You have attached onclick event handler in your...
Read more >Setting Snapping Parameters - Vectorworks
Double -click a snapping tool to open the SmartCursor Settings dialog box with specific snapping parameters for that tool. Some of the tools...
Read more >Create and work with ruler guides in InDesign - Adobe Support
Create and work with ruler guides, and use smart guides in InDesign. ... To create a spread guide without dragging, double-click a specific ......
Read more >Mouse click sensitivity - MicroStation Forum
In other words, it seems to double click, especially when I use the middle button to snap to an end point, or if...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@cedricsandars My fix was not the right fix, it just make the clock run all the time.
I found the right fix: https://github.com/software-mansion/react-native-reanimated/issues/182#issuecomment-519632308
@wilau2 - Thanks for helping again. Love the way how open source community works to help others even without even expecting anything in return 😃