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

fix: hide deactivated objects in relations dropdown #10564

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mdrazak2001
Copy link
Contributor

fixes #10563

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 adds a fix to hide deactivated objects in relation dropdowns by checking the active status of object metadata.

  • Added new hook useIsObjectMetadataActive in packages/twenty-front/src/modules/object-record/record-picker/hooks/useIsObjectMetadataActive.ts that checks if an object is active based on its singular name
  • Modified MultipleRecordPickerMenuItem.tsx to use the new hook and return null for inactive objects, preventing them from appearing in relation dropdowns
  • Implementation properly handles the edge case where object metadata might not be found by defaulting to false
  • Fix addresses issue Hide deactivated objects in relation dropdown #10563 where deactivated object types were still visible in relation dropdowns despite being deactivated

2 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings | Greptile

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.

Hide deactivated objects in relation dropdown
1 participant