From 0997c5fcb07e30ed57f6723663ef7ffe7134ee12 Mon Sep 17 00:00:00 2001 From: Titani Date: Tue, 2 Jul 2024 14:40:52 -0400 Subject: [PATCH 1/2] chore(Drag and drop): Updated example for multilist to use flex so that target list will maintain size when empty --- .../DragDrop/examples/DragDropMultipleLists.tsx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/react-core/src/components/DragDrop/examples/DragDropMultipleLists.tsx b/packages/react-core/src/components/DragDrop/examples/DragDropMultipleLists.tsx index 0400633987f..4a02ec361b0 100644 --- a/packages/react-core/src/components/DragDrop/examples/DragDropMultipleLists.tsx +++ b/packages/react-core/src/components/DragDrop/examples/DragDropMultipleLists.tsx @@ -1,5 +1,5 @@ import React from 'react'; -import { DragDrop, Draggable, Droppable, Split, SplitItem } from '@patternfly/react-core'; +import { DragDrop, Draggable, Droppable, Flex } from '@patternfly/react-core'; interface ItemType { id: string; @@ -85,19 +85,19 @@ export const DragDropMultipleLists: React.FunctionComponent = () => { return ( - + {Object.entries(items).map(([key, subitems]) => ( - - + + {(subitems as ItemType[]).map(({ id, content }) => ( {content} ))} - + ))} - + ); }; From 20e9f64a542fa2b80e0020070d18c0e7c3ba84b1 Mon Sep 17 00:00:00 2001 From: Titani Date: Mon, 15 Jul 2024 16:25:57 -0400 Subject: [PATCH 2/2] remove null check --- packages/react-core/src/components/DragDrop/Draggable.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/react-core/src/components/DragDrop/Draggable.tsx b/packages/react-core/src/components/DragDrop/Draggable.tsx index 4b84b95fd6f..8cf152a851d 100644 --- a/packages/react-core/src/components/DragDrop/Draggable.tsx +++ b/packages/react-core/src/components/DragDrop/Draggable.tsx @@ -117,7 +117,7 @@ export const Draggable: React.FunctionComponent = ({ index }; const dest = - hoveringDroppableId !== null && hoveringIndex !== null + hoveringDroppableId !== null ? { droppableId: hoveringDroppableId, index: hoveringIndex