我正在尝试在 react-select 组件选项上添加 fontawesome 图标和工具提示。下面的图片我正在努力实现
代码
import React, { Component } from 'react';
import Select from 'react-select';
const websiteFilterFiedsOptions = [
{value: '', label: 'Search and select website activity'},
{value: 'page_visited', label: 'Page Visited'},
{value: 'form_submitted', label: 'Form Submitted'}
]
export default class Website extends Component {
constructor(props) {
super(props);
this.state = {
selectedFilter: ''
}
}
filterSelectedData = function(data) {
}
render() {
return <div className="form-group">
<h6 className="website_filter"><b>Filters</b></h6>
<div className="location-search field-width filed_width_custom">
<Select
value={this.state.selectedFilter}
onChange={(e) => this.filterSelectedData(e)}
options={ websiteFilterFiedsOptions }
placeholder="Search and select website activity"
/>
</div>
</div>;
}
}