File tree Expand file tree Collapse file tree 1 file changed +2
-5
lines changed
packages/calcite-components/src/components/chip Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Original file line number Diff line number Diff line change @@ -204,7 +204,7 @@ export class Chip
204
204
connectInteractive ( this ) ;
205
205
connectLocalized ( this ) ;
206
206
connectMessages ( this ) ;
207
- this . setupTextContentObserver ( ) ;
207
+ this . mutationObserver ?. observe ( this . el , { childList : true , subtree : true } ) ;
208
208
}
209
209
210
210
componentDidLoad ( ) : void {
@@ -220,6 +220,7 @@ export class Chip
220
220
disconnectInteractive ( this ) ;
221
221
disconnectLocalized ( this ) ;
222
222
disconnectMessages ( this ) ;
223
+ this . mutationObserver ?. disconnect ( ) ;
223
224
}
224
225
225
226
async componentWillLoad ( ) : Promise < void > {
@@ -302,10 +303,6 @@ export class Chip
302
303
this . hasText = this . el . textContent . trim ( ) . length > 0 ;
303
304
}
304
305
305
- private setupTextContentObserver ( ) {
306
- this . mutationObserver ?. observe ( this . el , { childList : true , subtree : true } ) ;
307
- }
308
-
309
306
private handleSlotImageChange = ( event : Event ) : void => {
310
307
this . hasImage = slotChangeHasAssignedElement ( event ) ;
311
308
} ;
You can’t perform that action at this time.
0 commit comments