Comments (3)
sorry, you need to use layout props, it can not be empty now.
from react-drag-resize.
Hi,
I'm trying to get this to work just to see what it looks like, getting same error:
TypeError: Cannot read property 'zIndex' of undefined
124 | this.getDragProps(),
125 | React.createElement(
126 | 'div',
127 | { style: Object.assign({}, boxStyle, { zIndex: childMap.zIndex }) },
128 | React.createElement(
129 | _reactResizableBox2.default,
130 | _extends({ ref: function ref(resize) {
const sampleLayout = [{ key: 1, width: 100, height: 1000, x: 0, y: 0, zIndex: 1 } ]
<div><DragResizeContainer layout={sampleLayout}>
<div></div>
</DragResizeContainer></div>
An example would be really useful!
from react-drag-resize.
I add two rules for you question because of my old wrong demo.
child must use absolute style for position confirmation. Like style class: child-container size-auto
child must have key, key suggest use string
1、You need to debug source code, console what childMap is? I use sampleLayout, did not have any problem.
2、The demo I used before have some problem, So I add a new demo. Please view and follow it strictly.
If you still have something not understand , please tell me.
from react-drag-resize.
Related Issues (5)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-drag-resize.