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

Dropdown doesn't adjust its position (top or bottom) when the options change due to a typeahead #2092

Open
siovene opened this issue Jun 7, 2022 · 25 comments

Comments

@siovene
Copy link

siovene commented Jun 7, 2022

Describe the bug
In case of dynamically populate options (typeahead), the position of the dropdown (top or bottom) is not updated when the items change.

To Reproduce

  1. Create a page with an ng-select that's at the bottom of the page
  2. Set dropdownPosition to 'auto'
  3. Set a typeahead and type something that results in only a few options, so that they fit when the dropdown opens at the bottom.
  4. Now type something that results in a lot of options, so that the "bottom" position is not suitable anymore.

Expected behavior
I expect the dropdown to adjust it's position when the option items change, but it doesn't.

My workaround is the following, tapping into the typeahead:

setTimeout(() => {
    (this._ngSelect.dropdownPanel as any)._handleDropdownPosition();
}, 1);

But it's not nice because it depends on a private method.

@github-actions
Copy link

github-actions bot commented Aug 7, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions 🎆

@github-actions github-actions bot added the stale label Aug 7, 2022
@siovene
Copy link
Author

siovene commented Aug 7, 2022

Might be stale because the project owner hasn't addressed it, but it's an issue nonetheless. I recommend disabling this bot if this project is abandoned.

@github-actions github-actions bot removed the stale label Aug 8, 2022
@github-actions
Copy link

github-actions bot commented Oct 7, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions 🎆

@github-actions github-actions bot added the stale label Oct 7, 2022
@siovene
Copy link
Author

siovene commented Oct 7, 2022

.

@github-actions github-actions bot removed the stale label Oct 8, 2022
@fexxdev
Copy link

fexxdev commented Nov 7, 2022

It's happening here aswell

@github-actions
Copy link

github-actions bot commented Jan 7, 2023

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions 🎆

@github-actions github-actions bot added the stale label Jan 7, 2023
@siovene
Copy link
Author

siovene commented Jan 7, 2023

Might be stale because the project owner hasn't addressed it, but it's an issue nonetheless. I recommend disabling this bot if this project is abandoned.

@github-actions github-actions bot removed the stale label Jan 8, 2023
@github-actions
Copy link

github-actions bot commented Mar 9, 2023

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions 🎆

@github-actions github-actions bot added the stale label Mar 9, 2023
@siovene
Copy link
Author

siovene commented Mar 9, 2023

🏓

@github-actions github-actions bot removed the stale label Mar 10, 2023
@github-actions
Copy link

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions 🎆

@github-actions github-actions bot added the stale label May 10, 2023
@siovene
Copy link
Author

siovene commented May 10, 2023

🏓

@github-actions github-actions bot removed the stale label May 11, 2023
@github-actions
Copy link

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions 🎆

@github-actions github-actions bot added the stale label Jul 10, 2023
@siovene
Copy link
Author

siovene commented Jul 10, 2023

🏓

@github-actions github-actions bot removed the stale label Jul 11, 2023
@github-actions
Copy link

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions 🎆

@github-actions github-actions bot added the stale label Sep 10, 2023
@siovene
Copy link
Author

siovene commented Sep 10, 2023

🏓

@github-actions github-actions bot removed the stale label Sep 11, 2023
@fexxdev
Copy link

fexxdev commented Sep 11, 2023

up!

Copy link

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions 🎆

@github-actions github-actions bot added the stale label Nov 11, 2023
@siovene
Copy link
Author

siovene commented Nov 11, 2023

🏓

@github-actions github-actions bot removed the stale label Nov 12, 2023
Copy link

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions 🎆

@github-actions github-actions bot added the stale label Jan 12, 2024
@siovene
Copy link
Author

siovene commented Jan 12, 2024

🏓

@github-actions github-actions bot removed the stale label Jan 13, 2024
Copy link

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions 🎆

@github-actions github-actions bot added the stale label Mar 14, 2024
@siovene
Copy link
Author

siovene commented Mar 14, 2024

🏓

@github-actions github-actions bot removed the stale label Mar 15, 2024
Copy link

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions 🎆

@github-actions github-actions bot added the stale label May 14, 2024
@siovene
Copy link
Author

siovene commented May 14, 2024

🏓

@github-actions github-actions bot removed the stale label May 15, 2024
@pavankjadda
Copy link
Collaborator

@siovene care to contribute?

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

No branches or pull requests

3 participants