Skip to content

[Popper] Reposition when rerender #18310

@cmeeren

Description

@cmeeren
  • The issue is present in the latest release.
  • I have searched the issues of this repository and believe that this is not a duplicate.

Current Behavior 😯

When a tooltip's label is updated, the label is not repositioned. Furthermore, this can cause the tooltip to overflow, causing scrollbars.

Expected Behavior 🤔

When the tooltip's label is updated, the label should be re-positioned, just like it is after moving the mouse away and over again.

Steps to Reproduce 🕹

Unfortunately I'm not a JS dev and can't easily create a JS/TS repro (I use MUI through F#/Fable), but it should be easy to repro. Here's a gif (the tooltip is the only relevant part). Note the horizontal scrollbar when the label overflows.

bug

Your Environment 🌎

Tech Version
Material-UI v4.6.0
React 16.11.0
Browser Electron (Chromium)

Metadata

Metadata

Assignees

No one assigned

    Labels

    component: PopperThe React component. See <Popup> for the latest version.good first issueGreat for first contributions. Enable to learn the contribution process.type: bugIt doesn't behave as expected.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions