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

Migrate AppBar to tsx #4873

Conversation

josephktcheung
Copy link
Contributor

@josephktcheung josephktcheung commented May 28, 2020

Migrate AppBar to tsx #4505

@@ -147,17 +150,19 @@ const AppBar = props => {
);
};

interface Props {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello @josephktcheung can you please add title property as TitleComponent from ra-core

Copy link
Contributor Author

@josephktcheung josephktcheung May 29, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @MohammedFaragallah thanks for the review. Good catch on this, from what I understand AppBar no longer uses title prop, I guess the reason why it's not removed is because we inject title prop to AppBar in Layout. If we don't de-structure AppBar props here, we may pass a wrong title type to material-ui's AppBar by spreading the rest prop here

Therefore, I question the need of passing title prop when we cloneElement in https://github.com/marmelab/react-admin/blob/next/packages/ra-ui-materialui/src/layout/Layout.js#L124. I think title prop can be removed from AppBar which we did previously a9e4e0d but somehow reverted back by @fzaninotto 0f1b404#diff-bbb6c2d0f8bfb7588ebadf3e64ed2e57 perhaps because of the reason I mention above.

@fzaninotto please confirm if title prop is still relevant for AppBar or is it a legacy code?

@fzaninotto fzaninotto closed this Jun 5, 2020
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.

3 participants