(key: string)
| 235 | const lastPointerXRef = React.useRef(0) |
| 236 | |
| 237 | const handleTypeaheadSearch = (key: string) => { |
| 238 | const search = searchRef.current + key |
| 239 | |
| 240 | // Reset `searchRef` 1 second after it was last updated |
| 241 | ;(function updateSearch(value: string) { |
| 242 | searchRef.current = value |
| 243 | window.clearTimeout(timerRef.current) |
| 244 | if (value !== '') timerRef.current = window.setTimeout(() => updateSearch(''), 1000) |
| 245 | })(search) |
| 246 | } |
| 247 | |
| 248 | React.useEffect(() => { |
| 249 | return () => window.clearTimeout(timerRef.current) |
no outgoing calls
no test coverage detected
searching dependent graphs…