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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CSS mixup with custom AppBar #4388

Closed
alixongmbh opened this issue Feb 5, 2020 · 3 comments
Closed

CSS mixup with custom AppBar #4388

alixongmbh opened this issue Feb 5, 2020 · 3 comments

Comments

@alixongmbh
Copy link

Hi
When I place a Button element on my custom AppBar, the order of the CSS is changed. This causes display problems e.g. for BooleanInput.

This was working in 2.9 but not in 3.2

import React from 'react';
import AppBar from '@material-ui/core/AppBar';
import Toolbar from '@material-ui/core/Toolbar';
import Typography from '@material-ui/core/Typography';
import Button from '@material-ui/core/Button';

const MyAppBar = props => (
    <AppBar {...props}>
        <Toolbar>
            <Typography variant="h6" id="react-admin-title" />
            <Button>Hi</Button>
        </Toolbar>
    </AppBar>
)

export default MyAppBar;

2020-02-05_12h01_35
2020-02-05_12h01_17

@sidescraper
Copy link

test this:

import React from 'react';
import { AppBar, UserMenu, MenuItemLink } from 'react-admin';
import Typography from '@material-ui/core/Typography';
import Button from '@material-ui/core/Button';

const MyAppBar = props => (
    <AppBar {...props}>
            <Typography variant="h6" id="react-admin-title" />
            <Button>Hi</Button>
    </AppBar>
)

export default MyAppBar;

@fzaninotto
Copy link
Member

I don't understand what you mean by "the CSS order is changed". We use JSS, so there should not be any CSS cascade errors.

I suspect the problem comes from somewhere else (e.g. multiple versions of material-ui). We can only determine that its a react-admin bug if you provide us with a link to a CodeSandbox reproducing the issue (which is what the issue template asks you to do).

@alixongmbh
Copy link
Author

The comment from sidescraper helped me one step further.

But the solution was to erase and reinstall the complete react-admin environment.

Thanks a lot for the responses.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants