Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const handleMouseDown = (event, coords, td)=>{
- let now = new Date().getTime();
- // check if dbl-clicked within 1/5th of a second. change 200 (milliseconds) to other value if you want
- if(!(td.lastClick && now - td.lastClick < 200)) {
- td.lastClick = now;
- return; // no double-click detected
- }
- // double-click code goes here
- const instance = hot.current?.hotInstance;
- if(!instance){return}
- const s = instance.getSelected()
- if(s===undefined){
- return false
- }
- const data = instance.getSourceDataAtRow(s[0][0])
- if(data===null){
- return false
- }
- setSelectedData(data)
- setDetailOpen(true)
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement