@rpg-engine/long-bow 0.8.0 → 0.8.1
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/dist/long-bow.cjs.development.js +3 -4
- package/dist/long-bow.cjs.development.js.map +1 -1
- package/dist/long-bow.cjs.production.min.js +1 -1
- package/dist/long-bow.cjs.production.min.js.map +1 -1
- package/dist/long-bow.esm.js +3 -4
- package/dist/long-bow.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/Item/Inventory/ItemSlot.tsx +5 -10
package/package.json
CHANGED
|
@@ -176,20 +176,13 @@ export const ItemSlot: React.FC<IProps> = observer(
|
|
|
176
176
|
position: { x: 0, y: 0 },
|
|
177
177
|
isFocused: false,
|
|
178
178
|
});
|
|
179
|
-
}, [
|
|
180
|
-
containerType,
|
|
181
|
-
isDepotSystem,
|
|
182
|
-
setContextActions,
|
|
183
|
-
clearContextActions,
|
|
184
|
-
isContextMenuDisabled, // Added missing dependency
|
|
185
|
-
]);
|
|
186
179
|
|
|
187
|
-
useEffect(() => {
|
|
188
|
-
// Reset drag position and focus when item changes
|
|
189
180
|
clearDraggingState();
|
|
190
181
|
|
|
191
182
|
// Clear context actions when component unmounts or dependencies change
|
|
192
183
|
return () => {
|
|
184
|
+
clearDraggingState();
|
|
185
|
+
clearDetailsState();
|
|
193
186
|
clearContextActions();
|
|
194
187
|
};
|
|
195
188
|
}, [
|
|
@@ -198,7 +191,9 @@ export const ItemSlot: React.FC<IProps> = observer(
|
|
|
198
191
|
setContextActions,
|
|
199
192
|
clearContextActions,
|
|
200
193
|
isContextMenuDisabled,
|
|
201
|
-
|
|
194
|
+
clearDraggingState,
|
|
195
|
+
clearDetailsState,
|
|
196
|
+
updateDraggingState,
|
|
202
197
|
]);
|
|
203
198
|
|
|
204
199
|
const resetItem = () => {
|