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

Fix error when passing custom link style to SingleFieldList #4636

Merged

Conversation

Slavvkko
Copy link
Contributor

@Slavvkko Slavvkko commented Apr 3, 2020

Using

const useSingleFieldListStyles = makeStyles({
  root: {
    display: "block",
    flexWrap: "unset",
    marginTop: 0,
    marginBottom: 0
  },
  link: {
    display: "block"
  }
});

const Demo = props => {
  const singleFieldListClasses = useSingleFieldListStyles();
  return (
    <SingleFieldList classes={singleFieldListClasses}>
      <TextField source="name"/>
    </SingleFieldList>
  );
};

Got an error in console:
Material-UI: the key link provided to the classes prop is not implemented in undefined.

Because styles in SingleFieldList doesn't have link class

@fzaninotto fzaninotto changed the title fix error: Material-UI: the key link provided to the classes prop i… Fix error when passing custom link style to SingleFieldList Apr 9, 2020
@fzaninotto fzaninotto merged commit 0d0434a into marmelab:master Apr 9, 2020
@fzaninotto fzaninotto added this to the 3.4.1 milestone Apr 9, 2020
@fzaninotto
Copy link
Member

Thanks!

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

Successfully merging this pull request may close these issues.

2 participants