Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions projects/components/src/combo-box/combo-box.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -445,6 +445,7 @@ export class ComboBoxComponent<TValue = string> implements AfterViewInit, OnChan

public writeValue(text?: string): void {
this.text = text;
this.changeDetectorRef.markForCheck();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you need to call setText here? Everything except following

      this.textChange.emit(this.text);
      this.propagateValueChangeToFormControl(this.text);

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Applying setText without markForCheck doesn't update the text

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some function calls from setText still seems relevant whenever text is changed via form control. The emit and propogate method mentioned above would not be required. I will approve the PR, but you can play with it.

}

public registerOnChange(onChange: (value?: string) => void): void {
Expand Down