Fix/close filter by enter (#16643)

Fixes #16636 

Added useCloseDropdown() hook and set onEnter prop to
onEnter={closeDropDown()} using dropdownID

EDIT from @charlesBochet after refactoring:
- ObjectDropdownFilters are used in 3 places: Main Filter menu,
EditableChip, AdvancedFilters
- deprecate vectorSearch in view filter area, we are not using them, we
are doing a anyField filter now. While refactoring the points below, I
did not want to maintain vectorSearch as it was not used anymore
- stop confusing the dropdownId (which is an id to interact with a
specific dropdown) and componentInstanceIds (which is used to scope
component states) for EditableFilter case
- I haven't fixed the confusion for MainFilter case
- It was already handled for AdvancedFilter case

---------

Co-authored-by: Charles Bochet <charles@twenty.com>
Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
This commit is contained in:
Manikanth Martha
2025-12-18 19:55:56 +05:30
committed by GitHub
parent 52cf3775b3
commit 4bdd866a20
58 changed files with 183 additions and 537 deletions
@@ -19,7 +19,6 @@ const operandMapping: Record<string, ViewFilterOperand> = {
[ViewFilterOperandDeprecated.IsInPast]: ViewFilterOperand.IS_IN_PAST,
[ViewFilterOperandDeprecated.IsInFuture]: ViewFilterOperand.IS_IN_FUTURE,
[ViewFilterOperandDeprecated.IsToday]: ViewFilterOperand.IS_TODAY,
[ViewFilterOperandDeprecated.VectorSearch]: ViewFilterOperand.VECTOR_SEARCH,
[ViewFilterOperand.IS]: ViewFilterOperand.IS,
[ViewFilterOperand.IS_NOT_NULL]: ViewFilterOperand.IS_NOT_NULL,
[ViewFilterOperand.IS_NOT]: ViewFilterOperand.IS_NOT,