@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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rpg-engine/long-bow",
3
- "version": "0.8.0",
3
+ "version": "0.8.1",
4
4
  "license": "MIT",
5
5
  "main": "dist/index.js",
6
6
  "typings": "dist/index.d.ts",
@@ -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
- updateDraggingState, // Add this dependency
194
+ clearDraggingState,
195
+ clearDetailsState,
196
+ updateDraggingState,
202
197
  ]);
203
198
 
204
199
  const resetItem = () => {