We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5103909 commit 8459d60Copy full SHA for 8459d60
packages/material-ui/src/Tooltip/Tooltip.js
@@ -148,13 +148,15 @@ function Tooltip(props) {
148
// Fallback to this default id when possible.
149
// Use the random value for client side rendering only.
150
// We can't use it server-side.
151
- defaultId.current = `mui-tooltip-${Math.round(Math.random() * 1e5)}`;
+ if (!defaultId.current) {
152
+ defaultId.current = `mui-tooltip-${Math.round(Math.random() * 1e5)}`;
153
+ }
154
155
// Rerender with defaultId and childNode.
- if (openProp && !mountedRef.current) {
156
+ if (openProp) {
157
forceUpdate(n => !n);
158
}
- }, [mountedRef, openProp]);
159
+ }, [openProp]);
160
161
React.useEffect(() => {
162
return () => {
0 commit comments