Description:This PR adresses the issue #37 .
Changes made: WebDevTools/src/app/assets/nav.js
-Introduced a useRef to capture a reference to the dropdown element.
-Implemented an event listener on the document to detect clicks outside of the dropdown area.
-Created a handleClickOutside function that checks whether a click occurred outside of the dropdown and closes it accordingly.
-Updated the code within the Nav component to utilize the new event handling mechanism.
Do let me know if there is any discrepancy.
Thank You
Description:This PR adresses the issue #37 . Changes made: WebDevTools/src/app/assets/nav.js -Introduced a useRef to capture a reference to the dropdown element. -Implemented an event listener on the document to detect clicks outside of the dropdown area. -Created a handleClickOutside function that checks whether a click occurred outside of the dropdown and closes it accordingly. -Updated the code within the Nav component to utilize the new event handling mechanism.
Do let me know if there is any discrepancy.
Thank You