Skip to content
Advertisement

Tag: material-ui

Truncate value of Material UI Autocomplete (replicate Material UI Multiple Select’s truncated renderValue)

As some background With Material UI Multiple Select, you can truncate the value shown after selection, rather than going to another line (by setting the renderValue to .join the selected options, which gives the functionality of “option A, option B, …”). The important piece here is that it adds the “…” when the selected options are too long to fit

How to align Material-UI Menu items?

I use the menu and menu item of material-ui to build a select dropdown menu, but I found one thing strange: the dropdown menu always expand to the left side of the box, as the image shown below: I’ve tried to use the alignItems property inside my <MenuItem> but it didn’t work. My code is shown below. Can anybody help

Material-table: How change width of the columns?

I’m using the Material Table library that is officially recommended by Google Material UI as a data table library and having troubles with configuring the width of columns. Column width property is working until our content fits the cell: CodeSandbox Is there any solution to fix that? Answer If you want to set specific width to each column, I believe

How do I get Material-UI SpeedDialAction onClick events to fire when SpeedDial is open on click only (not hover)

For some reason, when I change material-ui <SpeedDial> to remove the prop onMouseEnter={handleOpen} so that the speed dial only opens upon clicking the FAB instead of on hover, the onClick event in <SpeedDialAction> does not get triggered when I click a speed dial menu item. I feel like I’m missing something fundamental here. Answer Using preventDefault will not cause the

Using Dividers inside Material-UI Tabs

If I want to use a Divider or something else that isn’t a Tab inside Material-UI Tabs, I get DOM warnings in the console. A workaround for this is to create a middleman-kind class like this: But I was thinking if this is the best solution to solve the issue or if there are other, better ways to stop getting

Rotate label – Material UI button

I’ve got a button like this (material-ui): I need to rotate the label (90 degrees). Can someone help me please? Thanks Answer Then you may want to change the height of the button too. Something like this for the root:

Advertisement