fix function editor in Grafana 6.4, closes #810
This commit is contained in:
@@ -3,7 +3,7 @@ import React from 'react';
|
||||
import { FunctionDescriptor, FunctionEditorControlsProps, FunctionEditorControls } from './FunctionEditorControls';
|
||||
|
||||
// @ts-ignore
|
||||
import { PopperController, Popper } from '@grafana/ui';
|
||||
import { PopoverController, Popover } from '@grafana/ui';
|
||||
|
||||
interface FunctionEditorProps extends FunctionEditorControlsProps {
|
||||
func: FunctionDescriptor;
|
||||
@@ -66,12 +66,12 @@ class FunctionEditor extends React.PureComponent<FunctionEditorProps, FunctionEd
|
||||
|
||||
render() {
|
||||
return (
|
||||
<PopperController content={this.renderContent} placement="top" hideAfter={300}>
|
||||
<PopoverController content={this.renderContent} placement="top" hideAfter={300}>
|
||||
{(showPopper, hidePopper, popperProps) => {
|
||||
return (
|
||||
<>
|
||||
{this.triggerRef && (
|
||||
<Popper
|
||||
<Popover
|
||||
{...popperProps}
|
||||
referenceElement={this.triggerRef.current}
|
||||
wrapperClassName="popper"
|
||||
@@ -101,7 +101,7 @@ class FunctionEditor extends React.PureComponent<FunctionEditorProps, FunctionEd
|
||||
</>
|
||||
);
|
||||
}}
|
||||
</PopperController>
|
||||
</PopoverController>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user