mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
10389 react tooltip components (#10473)
* poc: Use react-popper for tooltips #10389 * poc: Add popover component and use a hoc() for Tooltip + Popover to avoid code duplication #10389 * jest: Add snapshot tests to Popover and Tooltip #10389 * poc: Move target from hoc into Popover/Tooltip-component #10389 * poc: Clean up unused styles and use the existing Grafana style/colors on popper tooltip #10389 * poc: Remove test code before PR * poc: Remove imports used in poc but shouldn't be included anymore #10389
This commit is contained in:
committed by
Torkel Ödegaard
parent
aac1b250af
commit
e4a2bda4f2
@@ -23,6 +23,11 @@ export class AlertRuleList extends React.Component<IContainerProps, any> {
|
||||
|
||||
this.props.nav.load('alerting', 'alert-list');
|
||||
this.fetchRules();
|
||||
this.handleTooltipPositionChange = this.handleTooltipPositionChange.bind(this);
|
||||
|
||||
this.state = {
|
||||
tooltipPosition: 'auto',
|
||||
};
|
||||
}
|
||||
|
||||
onStateFilterChanged = evt => {
|
||||
@@ -44,6 +49,12 @@ export class AlertRuleList extends React.Component<IContainerProps, any> {
|
||||
});
|
||||
};
|
||||
|
||||
handleTooltipPositionChange(evt) {
|
||||
evt.preventDefault();
|
||||
this.setState({
|
||||
tooltipPosition: evt.target.value,
|
||||
});
|
||||
}
|
||||
render() {
|
||||
const { nav, alertList } = this.props;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user