Skip to content

There is a display problem at @mui/material@5.6.0 #5

@ShirasawaSama

Description

@ShirasawaSama

Versions

  • mui-color: 2.0.0-beta.2
  • @mui/material: 5.6.0
  • react: 18.0.0
  • @emotion/react: 11.9.0
  • @emotion/styled: 11.8.1
  • Edge Browser: 100.0.1185.29

Screenshots

image

But when I click anywhere on the UI it looks normal:

image

Codes

import React, { useState } from 'react'
import { colors } from '@mui/material'

export const colorMap: Record<string, string> = { }
for (const name in colors) if (name !== 'grey' && name !== 'blueGrey' && name !== 'common') colorMap[name] = colors[name][400]

const Comp = () => {
      const [color, setColor] = useState('#ffffff')
      return <ColorPicker
        deferred
        disableAlpha
        hideTextfield
        value={color}
        palette={colorMap}
        onChange={(color: any) => setColor('#' + color.hex)}
      />
}

I tried to delete all the above attributes, but I still couldn't solve it.

Other information

I noticed that nearly 30 style nodes are created each time picker is opened and closed, and will not be deleted.

image

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions