Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using icons causes Drawer component not opening in Remix example with React 18 #32891

Closed
2 tasks done
tombohub opened this issue May 24, 2022 · 1 comment
Closed
2 tasks done
Assignees
Labels
duplicate This issue or pull request already exists package: icons Specific to @mui/icons

Comments

@tombohub
Copy link

tombohub commented May 24, 2022

Duplicates

  • I have searched the existing issues

Latest version

  • I have tested the latest version

Current behavior 馃槸

The drawer is not opening

Expected behavior 馃

Drawer needs to open

Steps to reproduce 馃暪

Steps:

  1. download remix example from https://github.com/mui/material-ui/tree/master/examples/remix-with-typescript
  2. create new remix route file,
  3. got to mui drawer component https://mui.com/material-ui/react-drawer/#PersistentDrawerRight.tsx
  4. copy code and paste to newly created remix route
  5. run npm run dev
  6. go to browser, open the newly created route and click menu icon

it's not opening:

image

Context 馃敠

https://stackblitz.com/github/bnmiwpzvw?file=app/routes/drawer.tsx

Your environment 馃寧

`npx @mui/envinfo`
System:
    OS: Windows 10 10.0.19044
  Binaries:
    Node: 16.13.1 - C:\Program Files\nodejs\node.EXE
    Yarn: Not Found
    npm: 8.1.2 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Chrome: Version 101.0.4951.67 (Official Build) (64-bit)
    Edge: Spartan (44.19041.1266.0), Chromium (101.0.1210.53)
  npmPackages:
    @emotion/react: latest => 11.9.0
    @emotion/styled: latest => 11.8.1
    @mui/base:  5.0.0-alpha.82
    @mui/icons-material: ^5.8.0 => 5.8.0
    @mui/material: latest => 5.8.1
    @mui/private-theming:  5.8.0
    @mui/styled-engine:  5.8.0
    @mui/system:  5.8.1
    @mui/types:  7.1.3
    @mui/utils:  5.8.0
    @types/react: latest => 18.0.9
    react: latest => 18.1.0
    react-dom: latest => 18.1.0
    typescript: latest => 4.6.4

EDIT1:

EDIT2:

  • it's working if I don't use icons:

  • image

  • image

EDIT3

  • here is the console error when Icons are included:
    image

the code for that error is:

import { createTheme } from '@mui/material/styles';
import { red } from '@mui/material/colors';

// Create a theme instance.
const theme = createTheme({
  palette: {
    primary: {
      main: '#556cd6',
    },
    secondary: {
      main: '#19857b',
    },
    error: {
      main: red.A400,
    },
  },
});

export default theme;
  • this is what happens when NO ICONS are included:
    image

EDIT4:

EDIT5:

  • Tested with React 17 and 18. Working when Icons are NOT included in component.
@tombohub tombohub added the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label May 24, 2022
@siriwatknp siriwatknp added the component: drawer This is the name of the generic UI component, not the React module! label May 25, 2022
@tombohub tombohub changed the title Drawer component not opening using Remix example Using icons causes Drawer component not opening in Remix example May 25, 2022
@tombohub tombohub changed the title Using icons causes Drawer component not opening in Remix example Using icons causes Drawer component not opening in Remix example with React 18 May 26, 2022
@mnajdova mnajdova assigned mnajdova and unassigned siriwatknp Aug 31, 2022
@mnajdova
Copy link
Member

Duplicate of #31835

@mnajdova mnajdova marked this as a duplicate of #31835 Aug 31, 2022
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Aug 31, 2022
@mnajdova mnajdova added duplicate This issue or pull request already exists package: icons Specific to @mui/icons and removed component: drawer This is the name of the generic UI component, not the React module! status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Aug 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists package: icons Specific to @mui/icons
Projects
None yet
Development

No branches or pull requests

3 participants