ipfs-webui
ipfs-webui copied to clipboard
Fix Context Menu Behavior in Dropdown Component
Fixes #1617
Summary
This PR improves the context menu behavior while following the TypeScript migration guidelines. It ensures proper typing and modern React patterns while fixing the context menu functionality.
Changes
Context Menu Improvements
- Ensured only one context menu is displayed at a time
- Improved context menu event handling
- Added Escape key handler to dismiss context menus
- Prevent browser native context menu from coming up
TypeScript Migration
- Converted updated files to TypeScript (.tsx)
- Added proper TypeScript interfaces for all props
- Removed PropTypes in favor of TypeScript interfaces
- Used modern functional components with proper typing
- Added proper event type definitions
- Follows project's TypeScript guidelines