Coder Social home page Coder Social logo

Comments (12)

junyuanz123 avatar junyuanz123 commented on May 27, 2024 1

Thank you so much!

from re-flex.

leefsmp avatar leefsmp commented on May 27, 2024

I'm not sure what you are trying to do exactly, my guess is that there are several workarounds that you could try. Maybe you would need to use an other custom component inside the ReflexElement and overflow from this one so you have complete control. You can also pass a custom class to an element ReflexElement className="my-class" so you can overwrite its default css properties... If you could put a codepen or similar with a demo of what you are trying to achieve I can take a look. Here is a pen demo using reflex I created a while ago to use as a starting point.

from re-flex.

junyuanz123 avatar junyuanz123 commented on May 27, 2024

Thanks for the reply. So here is a demo i created: https://codepen.io/anon/pen/ypPJgW

What I am trying to do is make the hidden part visible.

<div
  style={{
    position: 'absolute',
    width: '200px',
    height: '100px',
    backgroundColor: 'white',
    top: '-50px',
    right: '-100px',
  }}
>
  test
</div>

from re-flex.

junyuanz123 avatar junyuanz123 commented on May 27, 2024

I also tried to add a div wrapper. https://codepen.io/anon/pen/zpPBwG

But this method will add a scrollbar, which is different from what I want.

from re-flex.

leefsmp avatar leefsmp commented on May 27, 2024

I am just adding overflow: visible to the left-pane class and z-index: 1000 for the white div and it works:

.left-pane {
    background-color: rgb(34, 34, 34);
    overflow: visible;
    color: #03d8ff;
}

<ReflexElement className="left-pane">
        <div
          style={{
            position: 'absolute',
            width: '200px',
            height: '100px',
            backgroundColor: 'white',
            top: '-50px',
            right: '-100px',
            zIndex: 1000
          }}
        >
          test
      </div>
</ReflexElement>

screen shot 2018-01-06 at 11 37 49

from re-flex.

junyuanz123 avatar junyuanz123 commented on May 27, 2024

Thanks for the reply.

Sorry, I modified the example, here is actually how I use re-flex in our product, https://codepen.io/anon/pen/qpVNvX

If I add overflow: visible !important to the test class, then it will take the full space.

from re-flex.

leefsmp avatar leefsmp commented on May 27, 2024

After looking a bit into it, I unfortunately don't have a suggestion for you. I'm not sure that what you are looking for is doable and I don't see a strong use case for such feature so I will close this issue as "out-of-scope" for the time being. I would recommend you take a look at combining the reflex layout with other library such as react-portal to get the desired result or something similar to react-bootstrap overlays which I successfully used in my app with reflex.

Hope that helps.

from re-flex.

leefsmp avatar leefsmp commented on May 27, 2024

I tried one more time and I think that by setting the test class as follow it produces the result you are looking for (I also had to set overflow: visible !important; on the outer ReflexElement to get the div visible on the right-pane):

.test {
    overflow: visible !important;

    & > div {
       height: auto !important;
    }
}

screen shot 2018-01-07 at 14 57 59

from re-flex.

gamerkonks avatar gamerkonks commented on May 27, 2024

When I add css to ReflexElement that has overflow: visible !important, my splitter is no longer movable. Is there anyway to have overflow: visible and a working splitter?

from re-flex.

leefsmp avatar leefsmp commented on May 27, 2024

What are you trying to do exactly? can you share a codepen/sandbox that shows the issue? Did you try to add css to an inner div inside ReflexElement instead?

from re-flex.

gamerkonks avatar gamerkonks commented on May 27, 2024

I'm trying to make it so that I can drag the splitter to the left or right, but the text is still visible if the splitter is dragged past the text (See screenshot). Or if there's some way of displaying the text below the splitter. I tried displaying the value in a div outside the ReflexContainer, but it would only update after releasing the splitter, I couldn't get it to update while dragging the splitter.
Codepen here: https://codepen.io/gamerkonks/pen/NWaPNQM

image

Thanks.

from re-flex.

leefsmp avatar leefsmp commented on May 27, 2024

seems over complicated to me, why don't you add an overlay div on top of the reflex container and use pointer-events: none on it so it doesn't block user interaction?

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.