mirror of
https://github.com/angular/angular
synced 2026-05-24 09:28:37 +00:00
fix(devtools): hide profiler node details when the frame is changed
Hide the details panel when the user selects a new frame.
(cherry picked from commit 2eaa4d54ad)
This commit is contained in:
parent
53e0aaba4e
commit
c0e0010bb9
1 changed files with 12 additions and 2 deletions
|
|
@ -42,8 +42,18 @@ export class RecordingVisualizerComponent {
|
|||
readonly changeDetection = input.required<boolean>();
|
||||
|
||||
readonly cmpVisualizationModes = VisualizationMode;
|
||||
private readonly selectedNode = linkedSignal<VisualizationMode, SelectedEntry | null>({
|
||||
source: this.visualizationMode,
|
||||
|
||||
private readonly selectedNodeCleanUpDeps = computed(
|
||||
// We don't care about the output format as long as
|
||||
// the value is different when a dependency changes
|
||||
// (i.e. it acts as a hash).
|
||||
// NOTE: It's safe to stringify the frames since they
|
||||
// are valid JSON objects that are also exported as part
|
||||
// of the profiler results report.
|
||||
() => JSON.stringify(this.frame()) + this.visualizationMode(),
|
||||
);
|
||||
private readonly selectedNode = linkedSignal<string, SelectedEntry | null>({
|
||||
source: this.selectedNodeCleanUpDeps,
|
||||
computation: () => null,
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue