fixes #6103 --------- Co-authored-by: Marie Stoppa <marie.stoppa@essec.edu>
This commit is contained in:
committed by
GitHub
parent
f24536c115
commit
284e75791c
@ -218,6 +218,7 @@ export const SettingsDataModelFieldSelectForm = ({
|
||||
<>
|
||||
{options.map((option, index) => (
|
||||
<DraggableItem
|
||||
isInsideScrollableContainer
|
||||
key={option.id}
|
||||
draggableId={option.id}
|
||||
index={index}
|
||||
|
||||
@ -7,6 +7,7 @@ type DraggableItemProps = {
|
||||
isDragDisabled?: boolean;
|
||||
index: number;
|
||||
itemComponent: JSX.Element;
|
||||
isInsideScrollableContainer?: boolean;
|
||||
};
|
||||
|
||||
export const DraggableItem = ({
|
||||
@ -14,6 +15,7 @@ export const DraggableItem = ({
|
||||
isDragDisabled = false,
|
||||
index,
|
||||
itemComponent,
|
||||
isInsideScrollableContainer,
|
||||
}: DraggableItemProps) => {
|
||||
const theme = useTheme();
|
||||
return (
|
||||
@ -36,7 +38,7 @@ export const DraggableItem = ({
|
||||
style={{
|
||||
...draggableStyle,
|
||||
left: 'auto',
|
||||
top: 'auto',
|
||||
...(isInsideScrollableContainer ? {} : { top: 'auto' }),
|
||||
transform: draggableStyle?.transform?.replace(
|
||||
/\(-?\d+px,/,
|
||||
'(0,',
|
||||
|
||||
Reference in New Issue
Block a user