6

Today I spent hours trying to figure out how the hell to add a Material-UI tooltip onto the ClearIndicator for a react-select multi-select component to warn the user that it would clear _all_ of their selections. Followed the examples in the react-select docs on how to make use of replaceable components, but all of their examples used a different library for the tooltip component, and there was no way I was going to bring in _another_ library that was going to add even more dependencies to the application.

In the end, my problem was that all of the examples were with components that could carry a ref and the component _I_ was targeting was a <path> element, which apparently can’t.

Solution? Add a div between the tooltip and the component I was replacing.

*facepalm*

Comments
Add Comment