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

Component: Autocomplete #14806

Closed
jafidelis opened this issue Feb 14, 2024 · 5 comments · Fixed by #14808
Closed

Component: Autocomplete #14806

jafidelis opened this issue Feb 14, 2024 · 5 comments · Fixed by #14808
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Milestone

Comments

@jafidelis
Copy link

jafidelis commented Feb 14, 2024

Describe the bug

Autocomplete, footer is not staying in place waiting, staying on top of the first item in the panel list.

Environment

win-11 - WSL

Reproducer

No response

Angular version

17.0.5

PrimeNG version

17.6.0

Build / Runtime

Angular CLI App

Language

TypeScript

Node version (for AoT issues node --version)

18.17.1

Browser(s)

Chrome 121

Steps to reproduce the behavior

Add <ng-template pTemplate="footer">content</ng-template>, in autocomplete component.

Expected behavior

Pin to the end of the results list

@jafidelis jafidelis added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Feb 14, 2024
@cetincakiroglu
Copy link
Contributor

Hi,

Could you please share a stackblitz example so we can identify the issue?

@cetincakiroglu cetincakiroglu added Resolution: Needs More Information More information about the issue is needed to find a correct solution and removed Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible labels Feb 14, 2024
@cetincakiroglu cetincakiroglu added this to the 17.8.0 milestone Feb 14, 2024
jafidelis pushed a commit to jafidelis/primeng that referenced this issue Feb 14, 2024
@cetincakiroglu
Copy link
Contributor

Hi,

Since you're using templating, you need to style elements inside the template option. We cannot interfere the styling of user templates. The reason why it stays on top is because the suggestions array empty and there isn't a CSS rule doing it. Here is the refactored version of your example: https://stackblitz.com/edit/bqllri-x2bzc2?file=src%2Fapp%2Fdemo%2Fautocomplete-virtual-scroll-demo.html,src%2Fapp%2Fdemo%2Fautocomplete-virtual-scroll-demo.ts

Closing the issue since it should be styled by the user.

@cetincakiroglu cetincakiroglu removed the Resolution: Needs More Information More information about the issue is needed to find a correct solution label Feb 22, 2024
@cetincakiroglu cetincakiroglu removed this from the 17.8.0 milestone Feb 22, 2024
@jafidelis
Copy link
Author

jafidelis commented Feb 22, 2024

Until version 16 when we used pTemplate="footer", the template was positioned by default, pined, below the scroll bar, in the lazyLoadgin option. Just like the pTemplate="header" is pined above the scroll bar.

pTemplate="footer" (lazyLoading option)
image

pTemplate="header"
image
https://stackblitz.com/edit/bqllri?file=src%2Fapp%2Fdemo%2Fautocomplete-virtual-scroll-demo.html,package.json

Version 16.2.0
image

https://stackblitz.com/edit/fbmrql?file=src%2Fapp%2Fdemo%2Fautocomplete-virtual-scroll-demo.html

@cetincakiroglu
Copy link
Contributor

cetincakiroglu commented Feb 29, 2024

Hi @jafidelis ,

Could you please update the links, they are broken and lead to the github/issues

cetincakiroglu added a commit that referenced this issue Feb 29, 2024
fix #14806 Fixed issue of the footer not being fixed to the end of t…
@github-actions github-actions bot added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Feb 29, 2024
@cetincakiroglu cetincakiroglu added Type: Bug Issue contains a bug related to a specific component. Something about the component is not working and removed Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible labels Feb 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants