-
Notifications
You must be signed in to change notification settings - Fork 0
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
15 add search input to filter students by name #22
base: main
Are you sure you want to change the base?
Conversation
…ub.com:d-stuff/netcraft-03-2022 into 15-add-search-input-to-filter-students-by-name
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.
Looks good!
@@ -0,0 +1,26 @@ | |||
import { users } from './usersData.js'; | |||
const URL='https://htmlpreview.github.io/?https://github.com/d-stuff/netcraft-03-2022/blob/main/' |
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.
"URL" is a native class name. Don't use this name.
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.
Also, use local urls. Don't put an absolute url from GitHub.
</header> | ||
<main> | ||
|
||
<input placeholder="e.g yaniv" id='user'type="search"> |
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.
Spaces, quotes.. use them.
<main> | ||
|
||
<input placeholder="e.g yaniv" id='user'type="search"> | ||
<button id="searchBtn" >search</button> |
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.
Why don't you use a
element?import { users } from './usersData.js'; | ||
const URL='https://htmlpreview.github.io/?https://github.com/d-stuff/netcraft-03-2022/blob/main/' | ||
const searchButton=document.querySelector('#searchBtn') | ||
searchButton.addEventListener('click',main) |
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.
It's better to create a form and to listen to the "submit" event.
No description provided.