🐛 Issue with moving categories up / down

This commit is contained in:
Meier Lukas
2023-10-09 06:30:43 +02:00
parent afe4ae54fa
commit fe36cffd19
11 changed files with 32 additions and 28 deletions

View File

@@ -1,5 +1,5 @@
import { GridStack } from 'fily-publish-gridstack';
import { PropsWithChildren, createContext, createRef, useContext } from 'react';
import { PropsWithChildren, createContext, useContext } from 'react';
type GridstackContextProps = {
ref: React.MutableRefObject<GridStack | undefined> | null;

View File

@@ -13,6 +13,7 @@ export const useResizeGridItem = () => {
const gridstackRef = useGridstackRef();
return ({ height, width, ...options }: ResizeGridItemProps) => {
if (!itemRef?.current) return;
gridstackRef?.current?.update(itemRef.current!, {
...options,
h: height,