Skip to content

Commit 7e83b79

Browse files
committed
Fixed select bugs
1 parent 627c3bf commit 7e83b79

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

components/select/select.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ export class SuiSelect implements AfterContentInit, AfterViewInit {
212212
this._dropdownService.isOpen = false;
213213
this.renderSelectedItem();
214214

215-
this._searchService.updateQuery("");
215+
this._searchService.updateQuery("", false)
216216
}
217217

218218
private focusSearch() {
@@ -229,11 +229,10 @@ export class SuiSelect implements AfterContentInit, AfterViewInit {
229229
}
230230

231231
public writeValue(value:any) {
232-
if (value) {
232+
if (value !== null && value !== undefined) {
233233
this.selectedOption = value;
234234
if (this.options.length > 0) {
235-
let compareValue = this._searchService.deepValue(value, this.keyField);
236-
this.selectedOption = this.options.find(o => compareValue == o);
235+
this.selectedOption = this.options.find(o => value == this._searchService.deepValue(o, this.keyField));
237236
}
238237
}
239238
this.renderSelectedItem();

components/transition/transition.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,6 @@ export class SuiTransition {
107107
return;
108108
}
109109
let animation = this.queue.slice(0, 1).pop();
110-
console.log(animation);
111110
if (!animation) {
112111
return;
113112
}

0 commit comments

Comments
 (0)