Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

md-autoselect #8285

Closed
Ronalses opened this issue Nov 7, 2017 · 8 comments
Closed

md-autoselect #8285

Ronalses opened this issue Nov 7, 2017 · 8 comments

Comments

@Ronalses
Copy link

Ronalses commented Nov 7, 2017

Hi, I have a question.
What is the equivalent of md-autoselect = "true"
mat-autoselect It does not work for me.

<mat-autocomplete mat-autoselect="true" #auto="matAutocomplete (optionSelected)="onSelectOption($event)">

@amcdnl
Copy link
Contributor

amcdnl commented Nov 7, 2017

Can you provide more information please?

@Ronalses
Copy link
Author

Ronalses commented Nov 7, 2017

OK, thanks for answering.
I want to use an autocomplete like this.
https://codepen.io/anon/pen/xOXoRP?editors=1010
Where the first element is automatically selected.
in this example they use md-autoselect = "true"
I try to use mat-autoselect = "true" but it does not work.

@josephperrott
Copy link
Member

It looks like you are actually using Material for AngularJS. You will need to post your issue here since they are maintained as separate projects. You may also have better luck asking on stackoverflow, gitter, etc.

@Ronalses
Copy link
Author

Ronalses commented Nov 8, 2017

no.
I am using material 2.
Sorry for my english.

Just give an example of what I am doing in material 2.

These are my dependencies.

"dependencies": { "@angular/animations": "^5.0.0", "@angular/cdk": "^5.0.0-rc0", "@angular/common": "^5.0.0", "@angular/compiler": "^5.0.0", "@angular/core": "^5.0.0", "@angular/forms": "^5.0.0", "@angular/http": "^5.0.0", "@angular/material": "^5.0.0-rc0", "@angular/platform-browser": "^5.0.0", "@angular/platform-browser-dynamic": "^5.0.0", "@angular/router": "^5.0.0", "connect": "^3.6.2", "core-js": "^2.4.1", "fabric": "^1.7.16", "hammerjs": "^2.0.8", "openseadragon": "^2.2.1", "rxjs": "^5.5.2", "serve-static": "^1.12.3", "zone.js": "^0.8.4" },

I am using this component: https://material.angular.io/components/autocomplete/overview
I am trying to have the first element automatically selected.
in the example I show above, they use md-autoselect = "true"

I am using mat-auto select = "true", but it does not work.

@Kampii
Copy link

Kampii commented Nov 13, 2017

Here is an example, type first two letters and hit enter.

@fintrader
Copy link

fintrader commented Dec 2, 2017

Anyway we can re-open this? I think @Ronalses is saying he would like the functionality of having the first element to be automatically selected like you can for Material for AngularJS. I am in the same boat - it would be great if we set the first element to always be selected.

EDIT:
These cases are related: #8319 and #8423

@Ronalses
Copy link
Author

Ronalses commented Dec 2, 2017

@Yoshi9143 Exactly what I would like to do.

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 7, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants