-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Added search suggestion capabilities for nbsearch #1038
Conversation
`input` event will trigger on every keystroke, therefore other developer can handle it and provide search suggestion as the user is typing.
Codecov Report
@@ Coverage Diff @@
## master #1038 +/- ##
==========================================
+ Coverage 81.16% 81.84% +0.67%
==========================================
Files 232 232
Lines 7057 7067 +10
Branches 599 599
==========================================
+ Hits 5728 5784 +56
+ Misses 1153 1104 -49
- Partials 176 179 +3
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @WLun001. Thanks a lot for the PR!
Let's add a new @Output input
for input
event in NbSearchFieldComponent
instead of changing submitSearch
behavior. This way we wouldn't break search API and users won't have to change their code after updating.
Also, please revert package-lock.json
changes.
Hi @yggg Do you have any idea where should the search suggestion to be displayed if other developer used it? |
Hi @WLun001. Unfortunately, there is no way to customize search screen.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@WLun001 Thanks for addressing review comments. Please, take a look at new ones. There are just a few left.
And thank you a lot for docs example as well!
src/playground/without-layout/search/search-with-input-event.component.ts
Outdated
Show resolved
Hide resolved
…earch-suggestion
</nb-card> | ||
</nb-layout-column> | ||
</nb-layout> | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unnecessary empty line
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed in f5d96dc
input
event will trigger on every keystroke, therefore other developer can handle it and provide search suggestion as the user is typing.Demo on
http://localhost:4200/#/search/search-event.component
Please read and mark the following check list before creating a pull request:
Short description of what this resolves:
Added search suggestion capabilities, that will emit event on every keystroke.
This can be handle by developers like this: https://angular.io/tutorial/toh-pt6#search-by-name