@rpg-engine/long-bow 0.7.76 → 0.7.77

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rpg-engine/long-bow",
3
- "version": "0.7.76",
3
+ "version": "0.7.77",
4
4
  "license": "MIT",
5
5
  "main": "dist/index.js",
6
6
  "typings": "dist/index.d.ts",
@@ -151,11 +151,7 @@ export const ItemSlot: React.FC<IProps> = observer(
151
151
  setContextActions,
152
152
  } = useItemSlotDetails();
153
153
 
154
- const {
155
- isContextMenuVisible,
156
-
157
- clearContextActions,
158
- } = detailsState;
154
+ const { isContextMenuVisible, clearContextActions } = detailsState;
159
155
 
160
156
  const dragContainer = useRef<HTMLDivElement>(null);
161
157
 
@@ -188,10 +184,13 @@ export const ItemSlot: React.FC<IProps> = observer(
188
184
 
189
185
  useEffect(() => {
190
186
  // Handle outside drop
191
- if (onDrop && item && dropPosition) {
192
- onDrop(item, dropPosition);
187
+ if (onDrop && draggingState.item && dropPosition) {
188
+ console.log('ITEM SLOT: Outside drop', draggingState.item.key);
189
+ onDrop(draggingState.item, dropPosition);
190
+
191
+ clearDraggingState();
193
192
  }
194
- }, [dropPosition, onDrop, item]);
193
+ }, [dropPosition, onDrop, draggingState.item]);
195
194
 
196
195
  const resetItem = () => {
197
196
  clearDraggingState();