mirror of
https://github.com/ajnart/homarr.git
synced 2025-11-10 15:35:55 +01:00
🐛 Fix issue with edit mode resizing
This commit is contained in:
@@ -232,6 +232,11 @@ export const useGridstack = (
|
||||
|
||||
// initialize the gridstack
|
||||
useEffect(() => {
|
||||
const removeEventHandlers = () => {
|
||||
gridRef.current?.off('change');
|
||||
gridRef.current?.off('added');
|
||||
};
|
||||
|
||||
const tilesWithUnknownLocation: TileWithUnknownLocation[] = [];
|
||||
initializeGridstack(
|
||||
areaType,
|
||||
@@ -250,7 +255,7 @@ export const useGridstack = (
|
||||
onAdd,
|
||||
}
|
||||
);
|
||||
if (!configName) return;
|
||||
if (!configName) return removeEventHandlers;
|
||||
updateConfig(configName, (prev) => ({
|
||||
...prev,
|
||||
apps: prev.apps.map((app) => {
|
||||
@@ -300,6 +305,7 @@ export const useGridstack = (
|
||||
};
|
||||
}),
|
||||
}));
|
||||
return removeEventHandlers;
|
||||
}, [items, wrapperRef.current, widgets, wrapperColumnCount]);
|
||||
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user