react-json-form icon indicating copy to clipboard operation
react-json-form copied to clipboard

FormDateTimeInput component listens for all click events even when the time selector is hdden

Open bhch opened this issue 3 years ago • 0 comments

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.

bhch avatar Feb 09 '22 15:02 bhch