Closed radenkovic closed 2 years ago
Hi @radenkovic ,
How would this actually differ from passing null
? This, from the top of my head, should be fine for propType validation.
@JorgenEvens sorry for delayed response! Actually null
passes propTypes validation, but it requires more a bit work (even without my PR, so when set to false
).
You can see here:
title={title || name || value}
That even when title is null or false, it will fallback to name or value...
We can add something like
let avatarTitle = title || name || value
if (title === null) avatarTitle = null
// ....
<Avatar title={avatarTitle} />
Same scenario, it would be great to disable the tooltip
Please add this feature Or one similar, like title={hideTitle ? null : (title || name || value)}
This has been fixed in the 5.0.0 release of react-avatar.
@radenkovic Thank you for your contribution!
I've issued a problem where I use custom tooltip over the avatar (
react-tooltip
), but I cannot settitle={false}
. It works but propTypes is showing warnings. This PR should allow to settitle={false}
in case you want to use custom tooltip