mirror of
https://github.com/ToolJet/ToolJet
synced 2026-05-23 08:58:26 +00:00
fix: dnd on pages section (#5202)
This commit is contained in:
parent
b714c71cd9
commit
5b3add2bff
1 changed files with 2 additions and 2 deletions
|
|
@ -8,7 +8,7 @@ import { SortableItem, SortableOverlay } from './components';
|
|||
|
||||
export function SortableList({ items, onChange, renderItem }) {
|
||||
const [active, setActive] = useState(null);
|
||||
const activeItem = useMemo(() => items.find((item) => item.id === active?.id), [active, items]);
|
||||
// const activeItem = useMemo(() => items.find((item) => item.id === active?.id), [active, items]);
|
||||
const sensors = useSensors(
|
||||
useSensor(PointerSensor),
|
||||
useSensor(KeyboardSensor, {
|
||||
|
|
@ -40,7 +40,7 @@ export function SortableList({ items, onChange, renderItem }) {
|
|||
<React.Fragment key={item.id}>{renderItem(item)}</React.Fragment>
|
||||
))}
|
||||
</SortableContext>
|
||||
<SortableOverlay>{activeItem ? renderItem(activeItem) : null}</SortableOverlay>
|
||||
{/* <SortableOverlay>{activeItem ? renderItem(activeItem) : null}</SortableOverlay> */}
|
||||
</DndContext>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue