From 6563a0b77f0380db938bb3c53703fa3a0ddd8b1d Mon Sep 17 00:00:00 2001 From: Victor B <39555268+victorbnl@users.noreply.github.com> Date: Sat, 27 May 2023 03:45:11 +0200 Subject: Fix to allow resizing of the todos panel (#1120) * Change all functions in the 'TodosPanel.tsx' to consistently use arrow-style --------- Co-authored-by: Vijay A --- src/features/todos/components/TodosWebview.tsx | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src') diff --git a/src/features/todos/components/TodosWebview.tsx b/src/features/todos/components/TodosWebview.tsx index 3385ff74c..4b53df956 100644 --- a/src/features/todos/components/TodosWebview.tsx +++ b/src/features/todos/components/TodosWebview.tsx @@ -98,15 +98,15 @@ class TodosWebview extends Component { } } - startResize(e: MouseEvent): void { + startResize = (e: MouseEvent): void => { this.setState({ isDragging: true, initialPos: e.clientX, delta: 0, }); - } + }; - resizePanel(e: MouseEventInit): void { + resizePanel = (e: MouseEventInit): void => { const { minWidth } = this.props; const { isDragging, initialPos } = this.state; @@ -117,9 +117,9 @@ class TodosWebview extends Component { delta, }); } - } + }; - stopResize(): void { + stopResize = (): void => { const { resize, minWidth } = this.props; const { isDragging, delta, width } = this.state; @@ -138,9 +138,9 @@ class TodosWebview extends Component { resize(newWidth); } - } + }; - startListeningToIpcMessages() { + startListeningToIpcMessages = (): void => { if (!this.webview) { return; } @@ -149,7 +149,7 @@ class TodosWebview extends Component { this.webview.addEventListener('ipc-message', e => { handleClientMessage(e.channel, e.args[0]); }); - } + }; render(): ReactElement { const { -- cgit v1.2.3-70-g09d2