1
1
mirror of https://github.com/twentyhq/twenty.git synced 2024-12-19 01:21:30 +03:00

fix: fix filter and sort position on board horizontal scroll ()

Closes 
This commit is contained in:
Thaïs 2023-09-01 11:54:34 +02:00 committed by GitHub
parent 240edda25c
commit 5653b89114
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -30,8 +30,10 @@ import { BoardOptions } from '../types/BoardOptions';
import { EntityBoardColumn } from './EntityBoardColumn';
const StyledCustomScrollWrapper = styled(ScrollWrapper)`
const StyledWrapper = styled.div`
display: flex;
flex-direction: column;
width: 100%;
`;
export function EntityBoard({
@ -105,7 +107,7 @@ export function EntityBoard({
const boardRef = useRef<HTMLDivElement>(null);
return (boardColumns?.length ?? 0) > 0 ? (
<StyledCustomScrollWrapper>
<StyledWrapper>
<BoardHeader
viewName="All opportunities"
viewIcon={<IconList size={theme.icon.size.md} />}
@ -113,29 +115,31 @@ export function EntityBoard({
onSortsUpdate={updateSorts}
context={CompanyBoardRecoilScopeContext}
/>
<StyledBoard ref={boardRef}>
<DragDropContext onDragEnd={onDragEnd}>
{sortedBoardColumns.map((column) => (
<BoardColumnIdContext.Provider value={column.id} key={column.id}>
<RecoilScope
SpecificContext={BoardColumnRecoilScopeContext}
key={column.id}
>
<EntityBoardColumn
boardOptions={boardOptions}
column={column}
onEditColumnTitle={onEditColumnTitle}
/>
</RecoilScope>
</BoardColumnIdContext.Provider>
))}
</DragDropContext>
</StyledBoard>
<ScrollWrapper>
<StyledBoard ref={boardRef}>
<DragDropContext onDragEnd={onDragEnd}>
{sortedBoardColumns.map((column) => (
<BoardColumnIdContext.Provider value={column.id} key={column.id}>
<RecoilScope
SpecificContext={BoardColumnRecoilScopeContext}
key={column.id}
>
<EntityBoardColumn
boardOptions={boardOptions}
column={column}
onEditColumnTitle={onEditColumnTitle}
/>
</RecoilScope>
</BoardColumnIdContext.Provider>
))}
</DragDropContext>
</StyledBoard>
</ScrollWrapper>
<DragSelect
dragSelectable={boardRef}
onDragSelectionChange={setCardSelected}
/>
</StyledCustomScrollWrapper>
</StyledWrapper>
) : (
<></>
);