Coder Social home page Coder Social logo

Comments (3)

leefsmp avatar leefsmp commented on May 26, 2024 1

Ok, I'll mention that in the doc... As you said this is not a bug, a ReflexContainer is supposed to be used in a parent component which should have an height, it doesn't necessarily has to be specified as a fixed value (like in the demo I sent) it could be "100vh" or itself set to "100%" of its parent ... Thanks btw!

from re-flex.

leefsmp avatar leefsmp commented on May 26, 2024

Can you be a bit more specific as to what is not working on your side? I created a basic test project using react-create-app and reflex, works fine as far as I can tell... Here is the link to my test project.

from re-flex.

stenbln avatar stenbln commented on May 26, 2024

My vertical splitter was not visible at all and horizontal was visible but not moveable. However, I've tracked down the bug. In src/lib/reflex-styles.scss the height and width of ReflexContainer are set to 100% of the parenting element. Which is not there! The quick fix is just to add a parenting div and set the desired height there.

So instead of:

      <ReflexContainer orientation="vertical">

        <ReflexElement className="left-pane">
          <div className="pane-content">
            Left Pane (resizeable)
          </div>
        </ReflexElement>

        <ReflexSplitter/>

        <ReflexElement className="right-pane">
          <div className="pane-content">
            Right Pane (resizeable)
          </div>
        </ReflexElement>

      </ReflexContainer>

we might have something like this:

<div style={{height:500}}>
      <ReflexContainer orientation="vertical">

        <ReflexElement className="left-pane">
          <div className="pane-content">
            Left Pane (resizeable)
          </div>
        </ReflexElement>

        <ReflexSplitter/>

        <ReflexElement className="right-pane">
          <div className="pane-content">
            Right Pane (resizeable)
          </div>
        </ReflexElement>

      </ReflexContainer>
</div>

Its not really a bug but I think it would be nice if it is mentioned in the documentation. Awesome library btw!

from re-flex.

Related Issues (20)

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.