From 0e089d0da0b26be3c39b2fe82f7f9081f809778f Mon Sep 17 00:00:00 2001 From: Vladimir Piskarev Date: Fri, 26 May 2023 14:16:58 +0300 Subject: [PATCH] Properly set the value of the select component in `DebugBreakpointWidget` Fixes #12547. --- .../debug/src/browser/editor/debug-breakpoint-widget.tsx | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/packages/debug/src/browser/editor/debug-breakpoint-widget.tsx b/packages/debug/src/browser/editor/debug-breakpoint-widget.tsx index acbb154e08d9d..83871971a6b6b 100644 --- a/packages/debug/src/browser/editor/debug-breakpoint-widget.tsx +++ b/packages/debug/src/browser/editor/debug-breakpoint-widget.tsx @@ -92,6 +92,8 @@ export class DebugBreakpointWidget implements Disposable { } } + private readonly selectComponentRef = React.createRef(); + @postConstruct() protected init(): void { this.doInit(); @@ -219,6 +221,10 @@ export class DebugBreakpointWidget implements Disposable { if (this._input) { this._input.getControl().setValue(this._values[this.context] || ''); } + const selectComponent = this.selectComponentRef.current; + if (selectComponent && selectComponent.value !== this.context) { + selectComponent.value = this.context; + } this.selectNodeRoot.render(); }