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

15 add search input to filter students by name #22

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

yanivza
Copy link
Contributor

@yanivza yanivza commented Aug 8, 2022

No description provided.

…ub.com:d-stuff/netcraft-03-2022 into 15-add-search-input-to-filter-students-by-name
@yanivza yanivza linked an issue Aug 8, 2022 that may be closed by this pull request
Copy link
Contributor

@BenOrHabari BenOrHabari left a 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/'
Copy link
Contributor

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.

Copy link
Contributor

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">
Copy link
Contributor

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>
Copy link
Contributor

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)
Copy link
Contributor

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.

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

Successfully merging this pull request may close these issues.

add search input to filter students by name
4 participants