DEV Community

vish0501
vish0501

Posted on

How to show React js tooltip on choice field hover?

I have a choice field, I want to show selected text when hover on control as tooltip. because when I select the value from choice field that do not show full text because of text length is big and control width is small. Below is the code
Note - I have PnP as well on the page-
import { DialogType, Label, Tooltip } from 'office-ui-fabric-react';

<div className={styles.fourColumn}>
<select className={styles.ddlFormControl}
id="additionalFundingVal" value={this.state.additionalVal}
onChange={this.handleChange} name="additionalFundingVal">
{this.state.additionalArray.map((type) =>
<option value={type}>{type}
</option>)}
</select>
</div>

Top comments (0)