-
Improvement
-
Resolution: Fixed
-
Minor
-
None
-
-
Blue Ocean 1.2-beta2
I have a labelFunction that returns a html element, which is fine for the dropDown options but for the dropDown title that is no good.
const parseOption = (option) => { // do we have the default option? const selected = defaultValue && defaultValue[0] && defaultValue[0].displayName === option; // what css clases to use const spanClass = selected ? '' : 'not-selected'; return (<span className={spanClass}> { selected && <img src={`${staticResourcePath()}/icons/done.svg`} className="selected" title="selected" /> } { option } </span>); };
Since the dropDown use the labelFunction to as well render the title of the button I need a way to define a custom title.
<Dropdown options={dropOptions} title={ label } labelFunction={parseOption} defaultOption={ label } />