Skip to content

Commit

Permalink
fix: perform page moves only on drop, as this is an expensive process #…
Browse files Browse the repository at this point in the history
  • Loading branch information
Julusian committed Dec 15, 2024
1 parent a2ab7fc commit 24d98ad
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion webui/src/Buttons/Pages.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,8 @@ const PageListRow = observer(function PageListRow({
const ref = useRef<HTMLTableRowElement>(null)
const [, drop] = useDrop<PageListDragItem>({
accept: PAGE_LIST_DRAG_ID,
hover(item, _monitor) {
drop(item, _monitor) {
// We do this one on drop, as it is costly to move the page around
if (!ref.current) {
return
}
Expand Down

0 comments on commit 24d98ad

Please sign in to comment.