Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed dropdown bugs on 0.34 #9000

Merged
merged 5 commits into from
Dec 10, 2024
Merged

Fixed dropdown bugs on 0.34 #9000

merged 5 commits into from
Dec 10, 2024

Conversation

lucasbordeau
Copy link
Contributor

@lucasbordeau lucasbordeau commented Dec 10, 2024

  • New task dropdown wasn't using the proper dropdown id
  • Action menu triggered by context menu (right click) on table cell was listening in edit mode.

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR Summary

This PR addresses dropdown rendering and context menu issues across table cells and dropdown components, focusing on portal behavior, positioning, and focus management.

  • Added context menu support in RecordTableCellDisplayMode and RecordTableCellDisplayContainer to handle right-click actions
  • Introduced avoidPortal prop in DropdownContent and Dropdown components to control portal rendering behavior
  • Implemented focus management in useTriggerActionMenuDropdown using useSetActiveDropdownFocusIdAndMemorizePrevious
  • Removed styling from RecordIndexActionMenuDropdown container to fix z-index and positioning issues
  • Added SHOW_PAGE_ADD_BUTTON_DROPDOWN_ID constant for consistent dropdown identification

9 file(s) reviewed, 1 comment(s)
Edit PR Review Bot Settings | Greptile

Comment on lines +13 to +15
const handleActionMenuDropdown = (event: React.MouseEvent) => {
onActionMenuDropdownOpened(event, recordId);
};
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

logic: event.preventDefault() should be called to prevent the default browser context menu from appearing

@lucasbordeau lucasbordeau merged commit 013eda4 into main Dec 10, 2024
19 checks passed
@lucasbordeau lucasbordeau deleted the fix/dropdown-bugs-2 branch December 10, 2024 15:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants