mat-select-search doesn’t load initial list

i am doing mat-select-search with this example .
i am using reactive forms, with dynamic data.
i have dynamic data vehicles, when i type in search it works but initial list doesn’t show.
how can i make my dynamic data show for the first time?


 vehicles = [];
  public filteredOptions: ReplaySubject<any[]> = new ReplaySubject<any[]>(1);
  protected _onDestroy = new Subject<void>();
  @Output() onSelectionChange: EventEmitter<any> = new EventEmitter<any>();

public modelFilterCtrl: FormControl = new FormControl();

   @ViewChild('multiSelect', { static: true }) multiSelect: MatSelect;
  ngOnInit(): void {
    this.campaignService.getVehicles().subscribe((data: any[])=>{
      this.vehicles = data;

    .subscribe(() => {


@Input() set data(data: any[]) {
    this._data = data;
    // load the initial list;
  get data(): any[] {
    return this._data;
  private _data: any[];

  ngAfterViewInit(): void {

  onChange($event) {

  private setInitialValue() {
      .pipe(take(1), takeUntil(this._onDestroy))
      .subscribe(() => {
          this.multiSelect.compareWith = (a: any, b: any) => a === b;


 <mat-select multiple formControlName="Brand" (selectionChange)="onChange($event)" #multiSelect>
      <mat-option *ngFor="let item of filteredOptions | async" [value]="item">{{item}}</mat-option>

Source: Angular Questions