-
Notifications
You must be signed in to change notification settings - Fork 38
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
Quite a challenge! #19
base: master
Are you sure you want to change the base?
Conversation
- Return search results on page Multi-line description of commit, feel free to be detailed. [Ticket: X]
searchFilmBytitle(params.query); | ||
currentPageNum.textContent = params.pageNum; | ||
document.querySelector('#film-details').innerHTML = ''; | ||
e.stopPropagation(); |
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 stopPropagation needed?
const prevPage = document.querySelector('#page-nav .prev'); | ||
prevPage.addEventListener('click', e => { | ||
e.preventDefault(); | ||
params.pageNum > 1 ? params.pageNum-- : false; // Prevent previous page returning negative page 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.
if might work better here since we do not need the false
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.
Resolved: if() substituted for ternary.
|
||
/* infinite scroll */ | ||
const infiniteScroll = () => { | ||
const trigger = document.querySelector('#'); |
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.
what does this do?
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.
Resolved. It's a TODO feature to add infinite scroll to search results
Good work |
localStorage proved very challenging, more time spent planning the structure of the app would have made development faster, but still a really enjoyable project. Just wish I could have got more done.