Closed tun100 closed 6 years ago
The component is exposed as a class. The ref callback should be working as expected. https://github.com/callemall/material-ui/blob/9ea0d4d67dd8d3f2c9f8602856655bfd07fc70ea/src/Dialog/DialogContent.js#L51
Sorry, but this issue isn't following our template. Nor it's providing a full reproduction example. I'm closing.
Try wrapping it in a
`
`
Hi, I'm develop a material-ui project. And It's almost done, but there's something is not suit for user to use.
Dialogs component is Good to select value of a list, but if the selected value control is the last index component of the list, and the list total item length is very big. When I reopen the list component, I want to make the parent component scrollTop position to target select item offsetTop.
And I want to set scrollTop to the parent component DialogContent, to get te ref element and set scrollTop by js. But I don't know where should to get the origin element.
I find a way to get ref, it's look likes:
But when I inspect it by console.log, it's ref props is undefined, and seems it's not origin HTML5 element.
Sorry to push this issue, I really need help, Could you tell me how to get the origin HTML5 element?Thanks a lot.