addressing:
https://github.com/twentyhq/twenty/issues/11997#issuecomment-2875772322
<img width="922" alt="Screenshot 2025-05-13 at 22 52 28"
src="https://github.com/user-attachments/assets/dc3b5fdd-b81b-4732-94f3-2ef2eb0012c2"
/>
before: 


https://github.com/user-attachments/assets/b55bf77e-99bf-485f-bcfa-5d311e7d2bd0

after: 


https://github.com/user-attachments/assets/70fb80b2-ce9f-4a8a-ac5d-d8c793c023be

### Some other issues I found

- On clicking clear, nothing happens

Before:


https://github.com/user-attachments/assets/01e937bb-b4d4-4296-baa7-ec1602de2cc9

After:


https://github.com/user-attachments/assets/8e4e5022-fe32-44fe-a7e4-5c98a7f3c2fa


- same behaviour for inline cell DateInput: 


https://github.com/user-attachments/assets/787354e5-b50a-457c-a392-4779270e2832


### Notes
The root issue seems to be that ViewBarFilterDropdown sets a fixed width
of 208px, which isn’t enough for the calendar to render correctly - it
ends up cropping the content. The fix here is more of a workaround than
a deep fix: I’ve adjusted styles to avoid the cropping, but it might be
worth revisiting how we handle sizing for filter dropdowns in general.

cc @lucasbordeau - thoughts?
Related commit:
afea017c12

---------

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Co-authored-by: Félix Malfait <felix@twenty.com>
This commit is contained in:
nitin
2025-05-14 16:35:51 +05:30
committed by GitHub
parent 9c2b88870f
commit 2aa5db580b
8 changed files with 22 additions and 13 deletions

View File

@ -56,7 +56,7 @@ export const ObjectFilterDropdownBooleanSelect = () => {
selectableItemIdArray={options.map((option) => option.toString())}
hotkeyScope={SingleRecordPickerHotkeyScope.SingleRecordPicker}
>
<DropdownMenuItemsContainer hasMaxHeight>
<DropdownMenuItemsContainer hasMaxHeight width="auto">
{options.map((option) => (
<StyledBooleanSelectContainer
key={String(option)}

View File

@ -81,6 +81,11 @@ export const ObjectFilterDropdownDateInput = () => {
const isRelativeOperand =
selectedOperandInDropdown === ViewFilterOperand.IsRelative;
const handleClear = () => {
isRelativeOperand
? handleRelativeDateChange(null)
: handleAbsoluteDateChange(null);
};
const resolvedValue = objectFilterDropdownCurrentRecordFilter
? resolveDateViewFilterValue(objectFilterDropdownCurrentRecordFilter)
: null;
@ -99,6 +104,7 @@ export const ObjectFilterDropdownDateInput = () => {
onChange={handleAbsoluteDateChange}
onRelativeDateChange={handleRelativeDateChange}
isDateTimeInput={isDateTimeInput}
onClear={handleClear}
/>
);
};

View File

@ -38,7 +38,7 @@ export const ObjectFilterDropdownNumberInput = () => {
};
return (
<DropdownMenuItemsContainer>
<DropdownMenuItemsContainer width="auto">
<DropdownMenuInput
ref={handleInputRef}
value={objectFilterDropdownFilterValue}