react-json-form
react-json-form copied to clipboard
FormDateTimeInput component listens for all click events even when the time selector is hdden
Once the FormDateTimeInput
component mounts, it starts listening for all click events. This is to close the time selector popup when a user clicks outside. But this also listens for click events even when the time selector is hidden. This seems bad for performance.
The component should only listen for click events while the time selector is visible/mounted. The solution is to move the click event listening code down to the time selector popup.