GithubHelp home page GithubHelp logo

Prevent drawer overlay close about orbit HOT 7 CLOSED

mapsgeek avatar mapsgeek commented on June 1, 2024
Prevent drawer overlay close

from orbit.

Comments (7)

mapsgeek avatar mapsgeek commented on June 1, 2024 1

Yes, we have a main Map component and need the drawer as a side panel for extra operations, so we need the drawer to stay open and not get closed when you click outside ( so the user can interact with the map ), sorry I found that not providing an onClose not an onClick can make it stay opened but the dark overlay covers and prevents interactions with the map and i can't extend the drawer component to hide overlay hence the question about ways to try adding a className so i can extend it.

from orbit.

silvenon avatar silvenon commented on June 1, 2024 1

Hey, I discussed this from the UX perspective with the design team, and they pointed out the same usability problem. It would be best for you to create a separate Sidebar component, feel free to reuse Drawer's code for this, since it's licensed under MIT. 😉

from orbit.

silvenon avatar silvenon commented on June 1, 2024

Hi, sounds like a sensible feature to have, to improve consistency. 👌 @mainframev?

from orbit.

mapsgeek avatar mapsgeek commented on June 1, 2024

@silvenon I've a question, the current drawer doesn't close on outside click if you don't pass an onClose prop
and control it via the shown={showDrawer} instead, this way you can have control on what opens and closes it
but i'm trying to hide the overlay background which isn't accessible because the component has no className prop
i've tried to extend it with cloneElement but i failed maybe because i used it wrong.
so my question in general React components is it possible to inject a className prop to a component like this case
so i can extend it's styles?

from orbit.

silvenon avatar silvenon commented on June 1, 2024

So you want to have the Drawer open but without the overlay? For what purpose? And how is it connected to what you said before about onClick and shown props?

from orbit.

silvenon avatar silvenon commented on June 1, 2024

Ah, got it! Seems like a reasonable feature, we'll think about how to implement it, I suppose overlay={false} should be fine.

from orbit.

silvenon avatar silvenon commented on June 1, 2024

However, no promises yet, Drawer is a component that covers part of the content, so arguably it might be a little odd to remove that overlay.

from orbit.

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.