You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Resizing the mat-option with height and line-height for the mat-autocomplete alters the autocomplete keyboard scrolling #10038
We currently assume that all options will have a particular height, which is why we have to truncate them as well. Your issue comes from the fact that you're overriding the height.
Thank you for the clarification, I wonder what’s the alternative, or just
won’t happen as it’s what I understand. You can close the ticket. Thank you
for your feedback
On Tue, 20 Feb 2018 at 19:01, Kristiyan Kostadinov ***@***.***> wrote:
We currently assume that all options will have a particular height, which
is why we have to truncate them as well. Your issue comes from the fact
that you're overriding the height.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#10038 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AEW4EeS1oPcFXXB7o2TAxweb8AL6g-5hks5tWxZ-gaJpZM4SL2Kl>
.
@crisbeto Hi! Could you please clarify what the reason to hardcode the height of mat-option component? Why it isn't possible to calculate height once a mat-option was rendered and then to use this value to calculate a correct scrollTop? Or even better - to be able to define mat-option height as @ Input() of MatAutocomplete or MatSelect ? Thanks
Reacted by Ankit Sharma, Matthew Sinex, Vincent Lycoops, Charles, Jon Zgoda, MarcGiffing, Markus Thiel, Eduard Kolosovskyi, Mohamed Badaoui and Francisco Arantes
I would also love a fix for this. Some of our autocompletes are composed of two or more lines of information, so the ability to change the height of the mat-option while maintaining the ability to navigate with the arrow keys would be great.
Reacted by Vincent Lycoops, Jon Zgoda, Antonio Valdez Arce, MarcGiffing, Markus Thiel, mhi, David Adams, Sahil Mangotra, Dmytro Mezhenskyi, Piotr Stawiński and 1 more
Hi guys,
i am using mat autocomplete i had Resizing the mat-option with height and line-height for the mat-autocomplete like below
.mat-autocomplete-panel mat-option {
height: 25px;
}
i am not able to see the highlighted option on arrow key down.
is there any solution please help.
Hi guys,
i am using mat autocomplete i had Resizing the mat-option with height and line-height for the mat-autocomplete like below
.mat-autocomplete-panel mat-option {
height: 25px;
}
i am not able to see the highlighted option on arrow key down.
is there any solution please help.
I think height of autocomplete and mat-option is constant , so when you scroll with keys it will only scroll when that constant height is breached (I'm not 100% sure but I think it works like this). When you define height globally It only changes the height but not the constants hardcoded. I had same issue I fixed it with some rxjs but it created some new issues, so I reset global styles and used default styles by angular.
I don't think that there is any workaround. But if anyone knows any please comment
angular-automatic-lock-bot commented on Sep 11, 2019
Activity
crisbeto commentedon Feb 20, 2018
Duplicate of #7211 (
mat-selectandmat-autocompleteuse the same option component).oscarlagatta commentedon Feb 20, 2018
Thanks I don’t see how one is related to the other, can you pls explain ?
crisbeto commentedon Feb 20, 2018
We currently assume that all options will have a particular height, which is why we have to truncate them as well. Your issue comes from the fact that you're overriding the height.
oscarlagatta commentedon Feb 20, 2018
DMezhenskyi commentedon Apr 25, 2018
@crisbeto Hi! Could you please clarify what the reason to hardcode the height of mat-option component? Why it isn't possible to calculate height once a mat-option was rendered and then to use this value to calculate a correct scrollTop? Or even better - to be able to define mat-option height as @ Input() of MatAutocomplete or MatSelect ? Thanks
supersinex commentedon Jun 6, 2018
I would also love a fix for this. Some of our autocompletes are composed of two or more lines of information, so the ability to change the height of the
mat-optionwhile maintaining the ability to navigate with the arrow keys would be great.noririco commentedon Feb 18, 2019
This issue is so annoying, And how the hell do you change the
AUTOCOMPLETE_OPTION_HEIGHT
no docs no nothing ;/
Sahil624 commentedon May 29, 2019
I think option height and autocomplete height should be configurable. Or there should be a dense view. (My use case)
mohamed-badaoui commentedon Jun 1, 2019
RIght now, the only way to overcome this is probably to add some global main style, like this :(
.mat-autocomplete-panel mat-option {
height: 25px;
}
deepthir9977 commentedon Jul 9, 2019
Hi guys,
i am using mat autocomplete i had Resizing the mat-option with height and line-height for the mat-autocomplete like below
.mat-autocomplete-panel mat-option {
height: 25px;
}
i am not able to see the highlighted option on arrow key down.
is there any solution please help.
Sahil624 commentedon Jul 9, 2019
I think height of autocomplete and mat-option is constant , so when you scroll with keys it will only scroll when that constant height is breached (I'm not 100% sure but I think it works like this). When you define height globally It only changes the height but not the constants hardcoded. I had same issue I fixed it with some rxjs but it created some new issues, so I reset global styles and used default styles by angular.
I don't think that there is any workaround. But if anyone knows any please comment
angular-automatic-lock-bot commentedon Sep 11, 2019
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.