Material UI components layout is weird whenever in first rendering - reactjs

When the first rendering, Material UI components is so weird.
Select is not full length, TransferList is not filled color, Button also.
And when I refresh browser, it's fine.
Is there some specific setting for that?
I think I use material ui normal way.
Thank you.

Related

Possible to inject material UI styles into iframe?

I'm using material UI 4.9.x and it doesn't seem possible to use MUI in an iframe with the global styles.
I'm trying to use a React portal to inject the content into the iframe.
THAT part works and my MUI context menu works properly, just has the wrong styles.
I'm trying to inject the styles via CssBaseline but that gets injected into the host window not the iframe window.
I've verified this by looking at the DOM and I can see the elements created there under and not in the iframe.
How would I go about injecting this, completely, into the iframe window.
One idea I had was to change the current / global document and window objects to represent the iframe but worried that might be too hacky.

how to style such component in material UI in reactjs

I am trying to make such kind of setup using material UI but am unable to do it properly using material UI.
I am not able to add the product add and remove setup below which should be below product name and price as shown in image.
If it is vital to use material-ui for positioning your elements and it expected to be responsive for different screen resolutions you could use https://material-ui.com/components/grid/
Otherwise, you can just use flexbox https://css-tricks.com/snippets/css/a-guide-to-flexbox/
There is a link to codesandbox for expamle made via MU Grids https://codesandbox.io/embed/material-demo-dvhfy?fontsize=14&hidenavigation=1&theme=dark

side content bar material ui

I'm interested in creating a content nav bar, similar to this one
This screenshot is taken from Material UI's site, but I haven't been able to find a component inside the library that resembles it. Is there one? Is there a way repurpose either a Drawer of an App Bar to replicate it?
Thanks
If it’s always visible on the page that is just a normal div really.
Set it up in your component (or wherever your routes are defined) so it is on every page

React Bootstrap Modal - some elements of background not shaded

I'm using the React Bootstrap modal, and when its open, the background is typically shaded and overlayed with the modal. However, certain elements (specifically the Material UI Drawer http://www.material-ui.com/#/components/drawer) don't get shaded and render over the modal. Does anyone know why this is?
I tried messing around with the zIndex values for the components, and made sure the modal's was higher, but got the same result. The Material UI Drawer has a 'zDepth' attribute which I also tried changing, but to no avail.
Thanks!
Adjusting the z-index of the modal and modal-backdrop higher to 1300 solves the issue for me!

Angular Material Sidenav Template?

I'm trying to implement the Material Design's Sidenav. I've got it to work correctly, but I was wondering if I can add templates to it like the mdDialog templates so that I can view different information on it?
I also was wondering how to get the side animation to work as for me right now, it just appears and has a fading black overlay.
Thanks

Resources