Fixed table header resize bugs (#14401)
This PR fixes the main resize bugs in https://github.com/twentyhq/core-team-issues/issues/1453 Changes : - A new `RecordTableResizeEffect` has been created to modify the last column width to compensate for the resize width dynamically, because of flew-wrap on the table elements, we cannot use width: 100% everywhere and we have to set the width of everything. - CSS transitions have been removed because they were degrading both the performance and the UX when resizing - Created a common `RecordTableHeaderCellContainer`, this was needed to factorize the various table header components - Created a `RecordTableHeaderLabelIdentifierCellPlusButton` component to ease the reading of `RecordTableHeaderLabelIdentifierCell` - Put the CSS of the blue line while resizing in the `RecordTableHeaderResizeHandler` component to avoid duplicating it everywhere. - Extracted `COLUMN_MIN_WIDTH` in a constant file Fixes https://github.com/twentyhq/core-team-issues/issues/1453
This commit is contained in:
+1
-1
@@ -1,11 +1,11 @@
|
||||
import styled from '@emotion/styled';
|
||||
import { type RefObject, useCallback, useState } from 'react';
|
||||
|
||||
import { useDragSelect } from '@/ui/utilities/drag-select/hooks/useDragSelect';
|
||||
import { useDragSelectWithAutoScroll } from '@/ui/utilities/drag-select/hooks/useDragSelectWithAutoScroll';
|
||||
import { useTrackPointer } from '@/ui/utilities/pointer-event/hooks/useTrackPointer';
|
||||
import { isDefined } from 'twenty-shared/utils';
|
||||
import { isDeeplyEqual } from '~/utils/isDeeplyEqual';
|
||||
import { useDragSelect } from '../hooks/useDragSelect';
|
||||
import { type SelectionBox } from '../types/SelectionBox';
|
||||
import { isValidSelectionStart } from '../utils/selectionBoxValidation';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user