File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -126,6 +126,13 @@ export class AnalysisView extends LitElement {
126126 document . addEventListener ( 'lv-find-close' , this . _findEvt ) ;
127127 }
128128
129+ disconnectedCallback ( ) : void {
130+ super . disconnectedCallback ( ) ;
131+ document . removeEventListener ( 'lv-find' , this . _findEvt ) ;
132+ document . removeEventListener ( 'lv-find-match' , this . _findEvt ) ;
133+ document . removeEventListener ( 'lv-find-close' , this . _findEvt ) ;
134+ }
135+
129136 updated ( changedProperties : PropertyValues ) : void {
130137 if (
131138 this . timelineRoot &&
Original file line number Diff line number Diff line change @@ -80,18 +80,27 @@ export class CalltreeView extends LitElement {
8080 return ( this . tableContainer = this . renderRoot ?. querySelector ( '#call-tree-table' ) ?? null ) ;
8181 }
8282
83+ private _goToRowEvt = ( ( e : CustomEvent ) => {
84+ this . _goToRow ( e . detail . timestamp ) ;
85+ } ) as EventListener ;
86+
8387 constructor ( ) {
8488 super ( ) ;
8589
86- document . addEventListener ( 'calltree-go-to-row' , ( ( e : CustomEvent ) => {
87- this . _goToRow ( e . detail . timestamp ) ;
88- } ) as EventListener ) ;
89-
90+ document . addEventListener ( 'calltree-go-to-row' , this . _goToRowEvt ) ;
9091 document . addEventListener ( 'lv-find' , this . _findEvt ) ;
9192 document . addEventListener ( 'lv-find-match' , this . _findEvt ) ;
9293 document . addEventListener ( 'lv-find-close' , this . _findEvt ) ;
9394 }
9495
96+ disconnectedCallback ( ) : void {
97+ super . disconnectedCallback ( ) ;
98+ document . removeEventListener ( 'calltree-go-to-row' , this . _goToRowEvt ) ;
99+ document . removeEventListener ( 'lv-find' , this . _findEvt ) ;
100+ document . removeEventListener ( 'lv-find-match' , this . _findEvt ) ;
101+ document . removeEventListener ( 'lv-find-close' , this . _findEvt ) ;
102+ }
103+
95104 updated ( changedProperties : PropertyValues ) : void {
96105 if (
97106 this . timelineRoot &&
Original file line number Diff line number Diff line change @@ -72,6 +72,13 @@ export class DMLView extends LitElement {
7272 document . addEventListener ( 'lv-find-match' , this . _findEvt ) ;
7373 }
7474
75+ disconnectedCallback ( ) : void {
76+ super . disconnectedCallback ( ) ;
77+ document . removeEventListener ( 'lv-find' , this . _findEvt ) ;
78+ document . removeEventListener ( 'lv-find-close' , this . _findEvt ) ;
79+ document . removeEventListener ( 'lv-find-match' , this . _findEvt ) ;
80+ }
81+
7582 updated ( changedProperties : PropertyValues ) : void {
7683 if (
7784 this . timelineRoot &&
@@ -226,6 +233,10 @@ export class DMLView extends LitElement {
226233 }
227234
228235 const newFindArgs = JSON . parse ( JSON . stringify ( e . detail ) ) ;
236+ if ( ! isTableVisible ) {
237+ newFindArgs . text = '' ;
238+ }
239+
229240 const newSearch =
230241 newFindArgs . text !== this . findArgs . text ||
231242 newFindArgs . options . matchCase !== this . findArgs . options ?. matchCase ;
Original file line number Diff line number Diff line change @@ -83,6 +83,13 @@ export class SOQLView extends LitElement {
8383 document . addEventListener ( 'lv-find-match' , this . _findEvt ) ;
8484 }
8585
86+ disconnectedCallback ( ) : void {
87+ super . disconnectedCallback ( ) ;
88+ document . removeEventListener ( 'lv-find' , this . _findEvt ) ;
89+ document . removeEventListener ( 'lv-find-close' , this . _findEvt ) ;
90+ document . removeEventListener ( 'lv-find-match' , this . _findEvt ) ;
91+ }
92+
8693 updated ( changedProperties : PropertyValues ) : void {
8794 if (
8895 this . timelineRoot &&
You can’t perform that action at this time.
0 commit comments