Skip to content

Commit 47ad03b

Browse files
danilsomsikovDevtools-frontend LUCI CQ
authored andcommitted
Fix the info widget updated in the protocol monitor.
Assign current, not previous param value and request render after creating a widget in the <devtools-widget> Bug: 392830597 Change-Id: I4cc35e23e5452e065a3c73cb71fc6fc6146f738c Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6206812 Reviewed-by: Nikolay Vitkov <[email protected]> Commit-Queue: Danil Somsikov <[email protected]>
1 parent 91816c4 commit 47ad03b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

front_end/ui/legacy/Widget.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ export class WidgetElement<WidgetT extends Widget&WidgetParams, WidgetParams = {
7979
if (this.#widgetParams) {
8080
Object.assign(widget, this.#widgetParams);
8181
}
82+
widget.requestUpdate();
8283
return widget;
8384
}
8485

@@ -92,7 +93,7 @@ export class WidgetElement<WidgetT extends Widget&WidgetParams, WidgetParams = {
9293
}
9394
}
9495
if (needsUpdate) {
95-
Object.assign(widget, this.#widgetParams);
96+
Object.assign(widget, config.widgetParams);
9697
widget.requestUpdate();
9798
}
9899
}

0 commit comments

Comments
 (0)