We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I asked the question on Slack and I was wising it will be fixed on the new React codebase. However, it still presents in the new code.
cd gridstack.js/react # apply the diff provided below to `src/demo/demo.tsx` npm run dev
diff --git a/react/src/demo/demo.tsx b/react/src/demo/demo.tsx index 2e1499b5..5071091c 100644 --- a/react/src/demo/demo.tsx +++ b/react/src/demo/demo.tsx @@ -1,5 +1,5 @@ import { ComponentProps, useEffect, useState } from "react"; -import { GridStackOptions, GridStackWidget } from "gridstack"; +import { GridStackOptions, GridStack, GridStackWidget } from "gridstack"; import { ComponentDataType, ComponentMap, @@ -136,8 +136,17 @@ export function GridStackDemo() { // ! Uncontrolled const [initialOptions] = useState(gridOptions); + useEffect(() => { + // setup drag drop behavior + let sidebarContent = [ + { w:2, h:2, subGridOpts: { children: [{content: 'nest 1'}, {content: 'nest 2'}]}} + ]; + GridStack.setupDragIn('.sidebar-item', undefined, sidebarContent); + }, []); + return ( <GridStackProvider initialOptions={initialOptions}> + <div className="sidebar-item grid-stack-item">Drag nested</div> <Toolbar /> <GridStackRenderProvider>
The item content shouldn't be missing.
The text was updated successfully, but these errors were encountered:
An experimental component here: https://github.com/Aysnine/gridstack-react/blob/main/src/examples/004-drag-in/index.tsx
New new react wrapper design on the way.
Sorry, something went wrong.
No branches or pull requests
Item Content is missing on Drag and Drop items
I asked the question on Slack and I was wising it will be fixed on the new React codebase. However, it still presents in the new code.
Your environment
Steps to reproduce
Expected behavior
The item content shouldn't be missing.
The text was updated successfully, but these errors were encountered: