Skip to main content
8,517 questions with no upvoted or accepted answers
17 votes
1 answer
4k views

How to use material-ui IconMenu inside cell of React fixed-data-table

I have put together a working sample of the grid and want to add an IconMenu into a column for each row of the grid. I am seeing the icon button, but when I click on it I do not get the menu. Below is ...
Elan's user avatar
  • 6,286
11 votes
2 answers
8k views

Test a onClose callback from dialog when using material UI & react testing library?

I'm currently trying to get complete test coverage on my react app however I'm stuck with jest when trying to test the callback event params from material UI components. I thought by testing the ...
Morphasis's user avatar
  • 1,413
9 votes
0 answers
2k views

Mui v5 Theme Palette typescript override not working

I'm trying to override one of the colors in the mui palette in my typescript project. I created a createPalette.d.ts file with the following: import type { PaletteOptions, Palette } from '@mui/...
MarksCode's user avatar
  • 8,484
9 votes
1 answer
3k views

In MUI v5, how do you debug/find a specific element/style/class in the dev tools DOM?

In MUI v4, it's very easy to inspect the DOM and isolate the exact component file and style block within that file: MUI v4 way of finding a specific element/style class However, in MUI v5, this is not ...
ReactDev's user avatar
  • 111
9 votes
0 answers
6k views

Material-UI date picker component not working properly on Safari

I am building a React app and using a material-ui-pickers Date Picker component inside a custom component that also uses formik form, and yup for validation. The component is working fine on different ...
Blueprint's user avatar
  • 432
9 votes
1 answer
2k views

Using mixins in material-ui to customize components in React

I am trying to customize a textfield component in Material-ui with React. According information from this page: To customize the colors of any part of the text-field, use the following mixins. We ...
Dawn17's user avatar
  • 8,247
9 votes
1 answer
5k views

Autocomplete Mui Testing, simulate change doesn't work

I need to simulate an onChange event with enzyme to update a state's component that is not working, I share the component's code in order to be helped. Component: import React, { useState } from '...
JOHN ALEXANDER AGUDELO GALEANO's user avatar
8 votes
1 answer
1k views

Using material-ui's useMediaQuery in Next.js causes style flickering on first rendering

Using @mui/material/useMediaQuery in Next.js causes style flickering on first rendering. I know this is due to the useMediaQuery value changing between server side and client side. Is there any way to ...
Jvn's user avatar
  • 475
8 votes
1 answer
5k views

How to add custom close icon for Alert component in Material UI, globally

We can globally customise the severity icons shown in the Alert component through the theme: MuiAlert: { defaultProps: { iconMapping: { info: <Info/>, success: <...
sergioruizsan's user avatar
8 votes
0 answers
760 views

MUI v5 migration - replacing withStyles and createStyles with styled utility

I am trying to migrate my MUI v4 to v5 Trying to replace all those utilities e.g. withStyles, createStyles and makeStyles my existing code is as below: export const DrawerThumbnail = withStyles(() =&...
Krunal Shah's user avatar
8 votes
2 answers
6k views

How to get overall error status on Material UI DataGrid?

I am using Material UI DataGrid component to render EXCEL file. Each Excel file has several column Names and have specific types. For example: const columns = [ { "field": "...
Suresh KUMAR Mukhiya's user avatar
8 votes
3 answers
1k views

How to prevent nearby text selection when pressing and holding a button on mobile?

I have an application where a user needs to press and hold a button to record audio. However, when a user holds the button on mobile, the browser tries to select nearby text (since the user is holding ...
Jordan Lewallen's user avatar
8 votes
0 answers
1k views

Server Rendering with Material-UI - removing `jss-server-side` afterwards.. bad workflow?

I do use material-ui with nextjs. In the documentation of material-ui I found this #the-client-side about implementing material-ui: function Main() { React.useEffect(() => { const jssStyles =...
suther's user avatar
  • 13.4k
8 votes
1 answer
3k views

Typescript: React.forwardRef with generic props from @material-ui

I'm trying to add custom logic on top of @material-ui Button component.To do so, I'm creating a component that is wrapping the original Button and it runs properly. My issue is to have this properly ...
ValentinH's user avatar
  • 938
8 votes
0 answers
2k views

How to use keyframes with styled from material-ui/styles

Any example how to use keyframes with styled from material-ui/styles? It's discussed here for the withStyles function, but not for the styled function. Here is the related sandbox example. Maybe ...
Micha's user avatar
  • 196

15 30 50 per page
1
2 3 4 5
568