Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initialize Drawer Within Element #44

Open
junbinku opened this issue Aug 31, 2018 · 9 comments
Open

Initialize Drawer Within Element #44

junbinku opened this issue Aug 31, 2018 · 9 comments

Comments

@junbinku
Copy link

Hi,
It is possible to have a drawer initialising only inside an element for example, drawer inside a div tag.

Here is some sample:

https://codesandbox.io/s/r5x6qnml6p

@jljsj33
Copy link
Member

jljsj33 commented Aug 31, 2018

getContainer={null}

@jljsj33 jljsj33 closed this as completed Aug 31, 2018
@junbinku
Copy link
Author

This didn't work for me:


<div className='containerGrid'> 
  <Drawer getContainer={null} ><div>test</div></Drawer>
</div>
.containerGrid {
  grid-row-start: 3;
  grid-row-end: 3;
  grid-column-start: 1;
  grid-column-end: 3;
}

@jljsj33
Copy link
Member

jljsj33 commented Aug 31, 2018

??????????
image

@junbinku
Copy link
Author

Sorry thats the sample of what I am trying to achieve.

@jljsj33 jljsj33 reopened this Aug 31, 2018
@jljsj33
Copy link
Member

jljsj33 commented Aug 31, 2018

I don't understand what you are saying.

You're going to be render in div. Or just putting Drawer on div, render in body?

render in div:

<div className='containerGrid'> 
  <Drawer getContainer = {null}><div>test</div></Drawer>
</div>

https://codesandbox.io/s/92l9541xrw

render in body

Your sample is in this way.

<div className='containerGrid'> 
  <Drawer ><div>test</div></Drawer>
</div>

https://codesandbox.io/s/1zoo8q0lj4

@jljsj33
Copy link
Member

jljsj33 commented Aug 31, 2018

翻译真累。。。

@ghost
Copy link

ghost commented Feb 25, 2019

Doing the following worked for me

<div style={{ transform: 'translate(0)' }}> 
  <Drawer ><div>test</div></Drawer>
</div>

@Alejandroid17
Copy link

This example https://codesandbox.io/s/92l9541xrw does not work correctly with version 4.4.3. How can I make it work correctly?

I want to do the same as this functionality (https://drawer-react-component.vercel.app/demo/no-mask), but inside a div.

@Alejandroid17
Copy link

This example https://codesandbox.io/s/92l9541xrw does not work correctly with version 4.4.3. How can I make it work correctly?

I want to do the same as this functionality (https://drawer-react-component.vercel.app/demo/no-mask), but inside a div.

I have built this example https://stackblitz.com/edit/react-krx3ez?file=src/App.js, which has been useful, but I would like the content of the body is not under the drawer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants