You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Tooltip component throws an invalid value error on the calculated left position when running in a test environment.
Seems that the offsetWidth is returned as undefined, which is being used to calculate the new value, which returned a calculated result of NaN. Not sure what is throwing this warning, but it can be addressed by setting a default value to the offsetWidth state to null.
Link to minimally-working code that reproduces the issue
Problem description
Tooltip component throws an
invalid value
error on the calculated left position when running in a test environment.Seems that the
offsetWidth
is returned asundefined
, which is being used to calculate the new value, which returned a calculated result ofNaN
. Not sure what is throwing this warning, but it can be addressed by setting a default value to theoffsetWidth
state tonull
.Link to minimally-working code that reproduces the issue
See master...pvienneau:master for a code diff with a test that fails without the provided fix.
Versions
The text was updated successfully, but these errors were encountered: