Fixed: Fields Disappear on Drag and Drop (#5703)
Now the fields don't disappear on drag and drop. - After reviewing the codebase, I checked that when `inView` is true the `RecordInlineCell` is rendered otherwise the `StyledRecordInlineCellPlaceholder` will render which causes the fields get disappear. - So, I added the condition to check if `isDragSelectionStartEnabled` is false then `StyledRecordInlineCellPlaceholder` will be rendered otherwise `RecordInlineCell`. fixes: #5651 https://github.com/twentyhq/twenty/assets/140178357/022195ca-fec2-43a7-8808-f4974dbe66cf --------- Co-authored-by: martmull <martmull@hotmail.fr>
This commit is contained in:
committed by
GitHub
parent
e49db63f30
commit
a6b8beed68
@ -23,6 +23,7 @@ import { Checkbox, CheckboxVariant } from '@/ui/input/components/Checkbox';
|
||||
import { contextMenuIsOpenState } from '@/ui/navigation/context-menu/states/contextMenuIsOpenState';
|
||||
import { contextMenuPositionState } from '@/ui/navigation/context-menu/states/contextMenuPositionState';
|
||||
import { AnimatedEaseInOut } from '@/ui/utilities/animation/components/AnimatedEaseInOut';
|
||||
import { useDragSelect } from '@/ui/utilities/drag-select/hooks/useDragSelect';
|
||||
import { ScrollWrapperContext } from '@/ui/utilities/scroll/components/ScrollWrapper';
|
||||
|
||||
const StyledBoardCard = styled.div<{ selected: boolean }>`
|
||||
@ -199,6 +200,7 @@ export const RecordBoardCard = () => {
|
||||
};
|
||||
|
||||
const scrollWrapperRef = useContext(ScrollWrapperContext);
|
||||
const { isDragSelectionStartEnabled } = useDragSelect();
|
||||
|
||||
const { ref: cardRef, inView } = useInView({
|
||||
root: scrollWrapperRef.current,
|
||||
@ -278,7 +280,7 @@ export const RecordBoardCard = () => {
|
||||
hotkeyScope: InlineCellHotkeyScope.InlineCell,
|
||||
}}
|
||||
>
|
||||
{inView ? (
|
||||
{inView || isDragSelectionStartEnabled() ? (
|
||||
<RecordInlineCell />
|
||||
) : (
|
||||
<StyledRecordInlineCellPlaceholder />
|
||||
|
||||
Reference in New Issue
Block a user