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

Inconsistent marking behavior with custom search #2200

Open
avelenivius opened this issue Mar 1, 2023 · 6 comments
Open

Inconsistent marking behavior with custom search #2200

avelenivius opened this issue Mar 1, 2023 · 6 comments
Assignees

Comments

@avelenivius
Copy link

Describe the bug
According to the example page, the behavior of marking a result item is different between default search and custom search. 
In case of [searchable]="true" the first Element of the results is marked, does not depend on if the results starts with the character or only contains it.
In Case of [searchable]="false" and searching on an input element, the element with the starting character is marked 
(and in case of many results the container scrolls to this element), not the first one of the list. This behavior gets a bit weird in case of [searchable]="false" and typing a word slowly. Result marking and scrolling are jumping all the time.

Reproducible example
NgSelect example page

To Reproduce
Steps to reproduce the behavior (if example is not provided):

  1. In Custom info display templates search for the letter 'd'
  2. The first option, which contains provided input is marked ('d' somewhere in the middle of the option)
  3. In Custom search control search for the letter 's'
  4. The option, that starts with the letter 's' is marked (although previous options contain this letter)

Expected behavior
The marking algorithm should be consistent, independent from the type of search

Screenshots
Using the default searching:
image

Using custom search control:
image

Desktop (please complete the following information):
It's a platform independent issue

Smartphone (please complete the following information):
N/A

@avelenivius
Copy link
Author

I think that is a quite significant inconsistence in behavior, so I will be just bumping this, so that it doesn't go stale

@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 Jun 12, 2023
@avelenivius
Copy link
Author

Bump

@github-actions github-actions bot removed the stale label Jun 13, 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 Aug 13, 2023
@avelenivius
Copy link
Author

Bump

@github-actions github-actions bot removed the stale label Aug 16, 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 🎆

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

No branches or pull requests

2 participants