material-ui icon indicating copy to clipboard operation
material-ui copied to clipboard

[Drawer] Cannot put an id prop

Open geoyws opened this issue 10 years ago • 5 comments

Problem description

Cannot put an id prop on the Drawer component. When I do, nothing reflects in the DOM under inspect.

Steps to reproduce

Put an id prop on the Drawer component

Versions

  • Material-UI: 0.16.0-alpha
  • React: 15.3.1
  • Browser: Version 52.0.2743.116 (64-bit)

geoyws avatar Sep 05 '16 02:09 geoyws

@geoyws: The Drawer component is structure like this:

<div>
  <Overlay />
  <Paper>
    { children }
  </Paper>
</div>

where would you want to put id prop and for what reason?

quangta93 avatar Sep 11 '16 21:09 quangta93

I'd like to put it on <Paper>

I have a scrolling list of content in a drawer, and, I would like to be able to scroll to elements within that content.

cpb avatar Nov 29 '16 22:11 cpb

I suppose I could add another div with an id i control...

cpb avatar Nov 29 '16 23:11 cpb

We have been porting the component on the next branch. We reimplemented it from the ground-up. While we haven't tested it, I think that the issue is most likely fixed on that branch. Hence, I'm closing it.

oliviertassinari avatar Jun 08 '17 19:06 oliviertassinari

this is the way to go: <Drawer PaperProps={{ id: 'id-drawer' }}>{...}</Drawer>

MrWest avatar Sep 06 '22 18:09 MrWest