311-data
311-data copied to clipboard
Would like a clear way to reset the NC selection
@ajmachado42 reported:
- [ ] There isn't a clear way to reset the NC selection--hitting exit and clicking on somewhere like the ocean doesn't work which was what I intuitively thought to do.
The short-term solution is to props-drill this.reset
from Map.jsx to the desired component so it can be called there.
However, the long-term solution may be a bit more involved. That is, it may require us to implement a custom event listener within Map.jsx that calls this.reset
. That way the custom event can be emitted from anywhere in the codebase to trigger the call by triggering the listener.
In case anybody else on the team can get to it before me, see: Using custom events in React
There is also some code in the react-toastify
codebase that could provide some inspiration on how this can be accomplished:
https://github.com/fkhadra/react-toastify/blob/main/src/core/eventManager.ts
Hey @edwinjue Do you have an update for us on this issue?
Please update:
- Progress:
- Blockers:
- Availability:
- ETA:
Thanks!