Code Monkey home page Code Monkey logo

Comments (3)

justQing00 avatar justQing00 commented on July 24, 2024

sorry, you need to use layout props, it can not be empty now.

from react-drag-resize.

bknill avatar bknill commented on July 24, 2024

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.

justQing00 avatar justQing00 commented on July 24, 2024

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 photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.