File tree Expand file tree Collapse file tree 1 file changed +2
-18
lines changed
Expand file tree Collapse file tree 1 file changed +2
-18
lines changed Original file line number Diff line number Diff line change @@ -54,8 +54,6 @@ export class SearchChange {
5454 [disabled]="disabled"
5555 [required]="required"
5656 [attr.aria-labelledby]="ariaLabelledby"
57- (click)="onClick($event)"
58- (change)="onChange($event)"
5957 (input)="onSearch($event.target.value)"/>
6058 <svg
6159 class="bx--search-magnifier"
@@ -179,22 +177,6 @@ export class Search implements ControlValueAccessor {
179177 this . onTouched = fn ;
180178 }
181179
182- /**
183- * Executes on the event of a change within `Search` to block propagation.
184- * @param {any } event
185- * @memberof Search
186- */
187- onChange ( event ) {
188- event . stopPropagation ( ) ;
189- }
190-
191- /**
192- * Handles click events on the `Search` and emits changes to other classes.
193- * @param {any } event
194- * @memberof Search
195- */
196- onClick ( event ) { }
197-
198180 /**
199181 * Called when search input is blurred. Needed to properly implement `ControlValueAccessor`.
200182 * @memberof Search
@@ -222,6 +204,7 @@ export class Search implements ControlValueAccessor {
222204 */
223205 clearSearch ( ) : void {
224206 this . value = "" ;
207+ this . propagateChange ( this . value ) ;
225208 }
226209
227210 /**
@@ -232,5 +215,6 @@ export class Search implements ControlValueAccessor {
232215 event . source = this ;
233216 event . value = this . value ;
234217 this . change . emit ( event ) ;
218+ this . propagateChange ( this . value ) ;
235219 }
236220}
You can’t perform that action at this time.
0 commit comments