tleunen / react-mdl

React Components for Material Design Lite
https://tleunen.github.io/react-mdl/
MIT License
1.76k stars 255 forks source link

fixed interaction between IconToggle and Tooltip #442

Closed bradzacher closed 4 years ago

bradzacher commented 7 years ago

The MDL Tooltip component uses the ID to find the element to attach the mouse events to.

IconToggle was putting the passed ID prop on the child, invisible input element, as opposed to the visible parent. This meant that you were not able to nest an IconToggle within a Tooltip.

This fix adds the ID to the parent instead, allowing the tooltip work.

tleunen commented 7 years ago

Looks good, but the proptype is missing for this id. Could you add it please?

bradzacher commented 7 years ago

@tleunen as requested. ID has been added to the proptypes

codecov-io commented 7 years ago

Codecov Report

Merging #442 into master will not change coverage. The diff coverage is 100%.

Impacted Files Coverage Δ
src/IconToggle.js 100% <100%> (ø) :arrow_up: