Skip to content

Commit

Permalink
fix(form:select): fix ignore reset option data when set onSearch (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
cipchk authored Sep 1, 2023
1 parent 79e229f commit 1f8def7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/form/src/widgets/select/select.widget.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import { ControlUIWidget } from '../../widget';
export class SelectWidget extends ControlUIWidget<SFSelectWidgetSchema> implements OnInit {
private search$ = new Subject<string>();
i!: SFSelectWidgetSchema;
data!: SFSchemaEnum[];
data: SFSchemaEnum[] = [];
_value: NzSafeAny;
hasGroup = false;
loading = false;
Expand Down Expand Up @@ -84,7 +84,7 @@ export class SelectWidget extends ControlUIWidget<SFSelectWidgetSchema> implemen
reset(value: SFValue): void {
getData(this.schema, this.ui, value).subscribe(list => {
this._value = value;
this.data = list;
if (this.ui.onSearch == null) this.data = list;
this.checkGroup(list);
this.detectChanges();
});
Expand Down

0 comments on commit 1f8def7

Please sign in to comment.