mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
chore: Add missing typings in PanelResizer
This commit is contained in:
parent
1230f3e48d
commit
ef4611eb56
@ -1,6 +1,6 @@
|
||||
import React, { PureComponent } from 'react';
|
||||
import { throttle } from 'lodash';
|
||||
import Draggable from 'react-draggable';
|
||||
import Draggable, { DraggableEventHandler } from 'react-draggable';
|
||||
|
||||
import { PanelModel } from '../panel_model';
|
||||
|
||||
@ -42,7 +42,7 @@ export class PanelResizer extends PureComponent<Props, State> {
|
||||
return 100;
|
||||
}
|
||||
|
||||
changeHeight = height => {
|
||||
changeHeight = (height: number) => {
|
||||
const sh = this.smallestHeight;
|
||||
const lh = this.largestHeight;
|
||||
height = height < sh ? sh : height;
|
||||
@ -54,7 +54,7 @@ export class PanelResizer extends PureComponent<Props, State> {
|
||||
});
|
||||
};
|
||||
|
||||
onDrag = (evt, data) => {
|
||||
onDrag: DraggableEventHandler = (evt, data) => {
|
||||
const newHeight = this.state.editorHeight + data.y;
|
||||
this.throttledChangeHeight(newHeight);
|
||||
this.throttledResizeDone();
|
||||
|
Loading…
Reference in New Issue
Block a user