diff --git a/src/renderer/components/hotbar/hotbar-menu.tsx b/src/renderer/components/hotbar/hotbar-menu.tsx index 522fcca027..897d4c0360 100644 --- a/src/renderer/components/hotbar/hotbar-menu.tsx +++ b/src/renderer/components/hotbar/hotbar-menu.tsx @@ -33,7 +33,7 @@ import { HotbarSelector } from "./hotbar-selector"; import { HotbarCell } from "./hotbar-cell"; import { HotbarIcon } from "./hotbar-icon"; import { defaultHotbarCells, HotbarItem } from "../../../common/hotbar-types"; -import { makeObservable, observable } from "mobx"; +import { action, makeObservable, observable } from "mobx"; interface Props { className?: IClassName; @@ -62,10 +62,12 @@ export class HotbarMenu extends React.Component { return catalogEntityRegistry.getById(item?.entity.uid) ?? null; } + @action onDragStart() { this.draggingOver = true; } + @action onDragEnd(result: DropResult) { const { source, destination } = result; @@ -181,7 +183,7 @@ export class HotbarMenu extends React.Component { return (
- + this.onDragStart()} onDragEnd={(result) => this.onDragEnd(result)}> {this.renderGrid()}