-
-
Notifications
You must be signed in to change notification settings - Fork 532
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
Styles gone after revisting page #610
Comments
So it looks like on the redirect from register to login and back to register, that the tooltip's div element is being assigned a different hashed class. The styles are in the console, but it's assigned to a different hashed className. |
Having the mismatched hashed class name issue too. No style is being applied because the class name in |
@faahim Had the same issue.To circumvent it for now, pass a 'uuid' prop to the styling component and it will not generate one on its own on re-render. Haven't seen anything break because of this fix.... yet.
@Joseppi83 thanks for raising this. Helped me zero in on the temp fix. PS : Found the source issue which allows us to do the aforementioned fix - #580 which is what led to adding the use of a prop uuid. |
@s-ashwinkumar Woo, thanks so much for all those info! When I saw it has mismatched hashes, I felt like, gosh, if it generates new ones every time, and it can go wrong, then it will go wrong at least some of the time. I know it can be reliable (UUID looks like a solid fix here), but my OCD brain wouldn't give me the peace of mind. 😅 I'm overriding the stylings with a custom class name for now. But will use Thanks a ton! |
Is there a more permanent fix? I'm seeing this happen already in my dev environment with only a few tooltips. I tried the uuid approach, but that actually broke more tooltips. Overriding the styles with custom classes seems to work far better. |
So I'm using react-tooltip for a register form. When I redirect to the login page, then redirect back to the register page with the register form, all the styles are gone from the tooltips. The text and css transitions still function, but the background and text color is gone.
I rebuild the tooltip bindings in useEffect with the following:
useEffect(() => { ReactTooltip.rebuild(); });
Anyone having similar problems?
The text was updated successfully, but these errors were encountered: