File tree Expand file tree Collapse file tree 2 files changed +8
-4
lines changed
packages/components/bolt-typeahead Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -108,6 +108,10 @@ class BoltAutosuggest extends withPreact() {
108
108
super . disconnecting && super . disconnecting ( ) ;
109
109
// Keep an object of listener types mapped to callback functions
110
110
this . _listeners = { } ;
111
+
112
+ // hack so that "ready" event will fire next time component connects,
113
+ // and any external listeners will be re-added
114
+ this . _wasInitiallyRendered = false ;
111
115
}
112
116
113
117
// return the parent that's rendering <bolt-autosuggest> based on Shadow DOM usage
Original file line number Diff line number Diff line change @@ -159,11 +159,11 @@ class BoltTypeahead extends withEvents(withLitHtml()) {
159
159
160
160
if ( this . autosuggest . _wasInitiallyRendered ) {
161
161
setupEventHandlers ( ) ;
162
- } else {
163
- this . autosuggest . addEventListener ( 'ready' , ( ) => {
164
- setupEventHandlers ( ) ;
165
- } ) ;
166
162
}
163
+
164
+ this . autosuggest . addEventListener ( 'ready' , ( ) => {
165
+ setupEventHandlers ( ) ;
166
+ } ) ;
167
167
}
168
168
}
169
169
}
You can’t perform that action at this time.
0 commit comments