Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Replace overlayDir.attach in MatSelectSearchComponent #209

Merged

Conversation

evoltafreak
Copy link
Contributor

@evoltafreak evoltafreak commented Feb 11, 2020

Replace overlayDir.attach in MatSelectSearchComponent with openedChange due deprecation in Angular 10.

fixes #208

@ghost
Copy link

ghost commented Feb 11, 2020

Congratulations 🎉. DeepCode analyzed your code in 2.32 seconds and we found no issues. Enjoy a moment of no bugs ☀️.

👉 View analysis in DeepCode’s Dashboard | Configure the bot

@macjohnny
Copy link
Member

@evoltafreak I noticed a problem with this PR when using <ngx-mat-select-search> without a wrapping <mat-option> element:

    <mat-select [formControl]="bankCtrl" placeholder="Bank" #singleSelect>
      <!-- <mat-option> -->
        <ngx-mat-select-search [formControl]="bankFilterCtrl"></ngx-mat-select-search>
      <!-- </mat-option> -->

      <mat-option *ngFor="let bank of filteredBanks | async" [value]="bank">
        {{bank.name}}
      </mat-option>
    </mat-select>

when clicking the mat select the first time, the panel will jump after the animation, see e.g.
https://stackblitz.com/edit/github-3utpdn?file=src%2Fapp%2Fexamples%2F01-single-selection-example%2Fsingle-selection-example.component.html

since this use case is the only reason this part of the code exists, I would suggest to deprecate this use case and remove this code when angular 10 is released. what do you think?

@evoltafreak
Copy link
Contributor Author

@macjohnny Yeah sure. I just wanted to mention the issue, so you won't be surprised when the property will be deprecated. Thanks for the testing.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Enhancement: Replacing overlayDir: CdkConnectedOverlay from MatSelectSearchComponent
2 participants