freenowtech / freenowtech/wave
Search throwing error when component gets unmounted
- Dominant language
- TypeScript
- Stars
- 67
- Forks
- 31
- Avg merge
- 1d 8h
- Merged PRs (30d)
- 4
Description
- `@freenow/wave` version: ^1.27.0
### Relevant code
```js
setSearchQuery(value)}
onClear={() => setSearchQuery('')}
/>
```
### Current Behaviour
When navigating away from a page with Search component, when running the application locally it throws the error shown in the video. In production it just silently puts this error into the console, without breaking anything.
### What was expected to happen?
No error thrown
### Reproduction
In my case when switching away from a page that has the Search component, the click outside event handler gets triggered, but the ref seems to already be gone from unmounting the parent component.
https://user-images.githubusercontent.com/9133431/226910666-973d4b7e-a69c-4d16-9450-7a18a93e8548.mov
Contributor guide
Assessment
This issue has not been assessed yet.