From 6d3c7bc5d38ec9b8ce65016c6f606b57f3d9e5dc Mon Sep 17 00:00:00 2001 From: Bernd Hufmann Date: Thu, 6 Nov 2025 09:58:32 -0500 Subject: [PATCH] Fix refresh of VIEWS view after applying configuration Add missing await call when calling onCustomizationClick() when handling the customization click button. Waiting ensures that the method updateAvailableViews() method to refresh the view is called after the customization is applied. Fixes #364 Signed-off-by: Bernd Hufmann --- .../src/trace-explorer/trace-explorer-views-widget.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/local-libs/traceviewer-libs/react-components/src/trace-explorer/trace-explorer-views-widget.tsx b/local-libs/traceviewer-libs/react-components/src/trace-explorer/trace-explorer-views-widget.tsx index 7d856098..8587bcd3 100644 --- a/local-libs/traceviewer-libs/react-components/src/trace-explorer/trace-explorer-views-widget.tsx +++ b/local-libs/traceviewer-libs/react-components/src/trace-explorer/trace-explorer-views-widget.tsx @@ -17,7 +17,7 @@ export interface ReactAvailableViewsProps { title: string; tspClientProvider: ITspClientProvider; contextMenuRenderer?: (event: React.MouseEvent, output: OutputDescriptor) => void; - onCustomizationClick?: (entry: OutputDescriptor, experiment: Experiment) => void; + onCustomizationClick?: (entry: OutputDescriptor, experiment: Experiment) => Promise; } export interface ReactAvailableViewsState { @@ -297,11 +297,11 @@ export class ReactAvailableViewsWidget extends React.Component { + private readonly handleCustomizeClick = async (entry: OutputDescriptor, e: React.MouseEvent) => { e.stopPropagation(); if (this.props.onCustomizationClick && this._selectedExperiment) { - this.props.onCustomizationClick(entry, this._selectedExperiment); - this.updateAvailableViews(); + await this.props.onCustomizationClick(entry, this._selectedExperiment); + await this.updateAvailableViews(); } };