Skip to content

Commit

Permalink
fix(DragDropSort): fix positioning of DragOverlay
Browse files Browse the repository at this point in the history
  • Loading branch information
adamviktora committed Apr 16, 2024
1 parent 62810f1 commit f039862
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import * as React from 'react';
import { createPortal } from 'react-dom';
import { css } from '@patternfly/react-styles';
import {
DndContext,
Expand Down Expand Up @@ -159,7 +160,7 @@ export const DragDropSort: React.FunctionComponent<DragDropSortProps> = ({
);
}
})}
<DragOverlay>{activeId && getDragOverlay()}</DragOverlay>
{createPortal(<DragOverlay>{activeId && getDragOverlay()}</DragOverlay>, document.getElementById('root'))}
</SortableContext>
);

Expand Down

0 comments on commit f039862

Please sign in to comment.