-
-
Notifications
You must be signed in to change notification settings - Fork 6
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
feat: search bar component #95
Conversation
@state() | ||
_pageCount?: Number; | ||
|
||
@state() | ||
_results?: {}[]; | ||
|
||
@state() | ||
_count?: Number; |
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.
Is it usefull to comment states like you do for property ?
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.
Good point, I'll add them on next PR.
const response = await fetch(this._searchUrl()); | ||
const data = await response.json(); |
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.
I don't understand why this is in two lines
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.
just for readability ! How would you write it ?
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.
I didn't understand why the two "await" were necessary.
I just got it 👍🏼
Merging, as it's work in progress, not displayed yet. |
Initial work on the search-bar component
we have a search box and a button. It can be tested locally on http://search.localhost:8000/static/off.html.
At the moment it just send the request, it does not display the results (next results components).