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

[Tooltip] Zero-length titles string are never displayed #9766

Merged
merged 1 commit into from Jan 6, 2018

Conversation

oliviertassinari
Copy link
Member

@oliviertassinari oliviertassinari commented Jan 6, 2018

The title propType won't warn for an empty title string like in the following example:

<Tooltip title="" />

It's considered a valid node. However, there is no point at displaying an empty tooltip.

Closes #9714

@oliviertassinari oliviertassinari added the component: tooltip This is the name of the generic UI component, not the React module! label Jan 6, 2018
Copy link
Member

@mbrookes mbrookes left a comment

Choose a reason for hiding this comment

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

LGTM! (One minor typo..)

@@ -25,7 +25,7 @@ filename: /src/Tooltip/Tooltip.js
| open | bool | | If `true`, the tooltip is shown. |
| placement | enum:&nbsp;'bottom-end', 'bottom-start', 'bottom', 'left-end', 'left-start', 'left', 'right-end', 'right-start', 'right', 'top-end', 'top-start', 'top'<br> | 'bottom' | Tooltip placement |
| PopperProps | object | | Properties applied to the `Popper` element. |
| <span style="color: #31a148">title *</span> | node | | Tooltip title. |
| <span style="color: #31a148">title *</span> | node | | Tooltip title. zero-length titles string are never displayed. |
Copy link
Member

Choose a reason for hiding this comment

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

"Zero-length"?

@oliviertassinari oliviertassinari merged commit 25ec827 into mui:v1-beta Jan 6, 2018
@oliviertassinari oliviertassinari deleted the tooltip-empty-title branch January 6, 2018 18:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: tooltip This is the name of the generic UI component, not the React module!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants