mui / material-ui

Material UI: Comprehensive React component library that implements Google's Material Design. Free forever.
https://mui.com/material-ui/
MIT License
93.52k stars 32.19k forks source link

[docs][material-ui] TableContainer not well documented #42836

Closed ZebraFlesh closed 2 weeks ago

ZebraFlesh commented 3 months ago

Related page

https://mui.com/material-ui/api/table-container/

Kind of issue

Missing information

Issue description

It's not clear to me what a TableContainer is and when I would/wouldn't want to use it. The demos say "see Table", but the Table demos don't really explain it -- searching for TableContainer on https://mui.com/material-ui/react-table/ only turns up one hit, the link back to the TableContainer API.

Context

I'm trying to construct my first HTML table with MUI. Do I need a TableContainer? Why? Can I do without it? What's the tradeoff for using vs. not using?

Search keywords: TableContainer

ZeeshanTamboli commented 3 months ago

This is related to #39952 and is being tracked here. Would you like to create a pull request?

ZebraFlesh commented 3 months ago

Unfortunately I don't know the answers to the questions I posed, so I am unable to make a PR.

ZeeshanTamboli commented 3 months ago

Unfortunately I don't know the answers to the questions I posed

That's what we need to document.

mi-na-bot commented 2 months ago

Does it provide a horizontally scrollable 100% width container (for mobile devices and too-wide tables) and not much more?

https://github.com/mui/material-ui/blob/master/packages/mui-material/src/TableContainer/TableContainer.js#L20-L27

ZeeshanTamboli commented 2 months ago

Does it provide a horizontally scrollable 100% width container (for mobile devices and too-wide tables) and not much more?

https://github.com/mui/material-ui/blob/master/packages/mui-material/src/TableContainer/TableContainer.js#L20-L27

Yes, that's correct, and it also allows you to change the root container, like to the Paper component, as shown in the demos.

github-actions[bot] commented 2 weeks ago

This issue has been closed. If you have a similar problem but not exactly the same, please open a new issue. Now, if you have additional information related to this issue or things that could help future readers, feel free to leave a comment.

[!NOTE] We value your feedback @ZebraFlesh! How was your experience with our support team? If you could spare a moment, we'd love to hear your thoughts in this brief Support Satisfaction survey. Your insights help us improve!