Skip to content

Commit

Permalink
Fixed dropdown menu not visible after selecting all fields from a rec…
Browse files Browse the repository at this point in the history
…ord table
  • Loading branch information
harshit078 committed Nov 15, 2024
1 parent 7d21434 commit a86eca1
Showing 1 changed file with 0 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,8 @@ import { IconPlus, ThemeContext } from 'twenty-ui';

import { HIDDEN_TABLE_COLUMN_DROPDOWN_ID } from '@/object-record/record-table/constants/HiddenTableColumnDropdownId';
import { RecordTableHeaderPlusButtonContent } from '@/object-record/record-table/record-table-header/components/RecordTableHeaderPlusButtonContent';
import { hiddenTableColumnsComponentSelector } from '@/object-record/record-table/states/selectors/hiddenTableColumnsComponentSelector';
import { Dropdown } from '@/ui/layout/dropdown/components/Dropdown';
import { useScrollWrapperScopedRef } from '@/ui/utilities/scroll/hooks/useScrollWrapperScopedRef';
import { useRecoilComponentValueV2 } from '@/ui/utilities/state/component-state/hooks/useRecoilComponentValueV2';

const StyledPlusIconHeaderCell = styled.th<{
theme: Theme;
Expand Down Expand Up @@ -58,16 +56,12 @@ export const RecordTableHeaderLastColumn = () => {
(scrollWrapper.ref.current?.clientWidth ?? 0) <
(scrollWrapper.ref.current?.scrollWidth ?? 0);

const hiddenTableColumns = useRecoilComponentValueV2(
hiddenTableColumnsComponentSelector,
);

return (
<StyledPlusIconHeaderCell
theme={theme}
isTableWiderThanScreen={isTableWiderThanScreen}
>
{hiddenTableColumns.length > 0 && (
<Dropdown
dropdownId={HIDDEN_TABLE_COLUMN_DROPDOWN_ID}
clickableComponent={
Expand All @@ -81,7 +75,6 @@ export const RecordTableHeaderLastColumn = () => {
scope: HIDDEN_TABLE_COLUMN_DROPDOWN_HOTKEY_SCOPE_ID,
}}
/>
)}
</StyledPlusIconHeaderCell>
);
};

0 comments on commit a86eca1

Please sign in to comment.