-
Notifications
You must be signed in to change notification settings - Fork 22
SearchBox for Questions #5
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
Conversation
|
Solves #2 |
| yield timeout(250) | ||
| const questions = yield this.get('store').query('question', { | ||
| include: 'user', | ||
| page: { |
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.
remove the page qp here, we don't want to have current pagination applied to the filtered response instead, pagination params should reset when filtering.
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.
Fixed! @abhishek97
|
|
||
| if(searchStr === '') { | ||
| pageOpts = { | ||
| number: 1, |
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.
We don't use number, we use offset based pagination for the backend.
Just skip the pagination part for now altogether as it is not directly related to this PR.
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.
Done! Pagination part removed when search box is not empty. Pls note that the line mentioned by you above works for empty string (ie when searchbox is made empty). In this case, the default pagination behavior is restored. So, if I remove pageOpts from here, all the results will be displayed (instead of only 10 results).
94539c1 to
2b19e1d
Compare
2b19e1d to
316f5fa
Compare
|
@abhishek97 |
c0b4cdf to
12f90d5
Compare
|
@firefinchdev The functionality works fine. Just place the search box in a new line and center align with an appropriate title. |
|
Done |
Done
@abhishek97 Pls Review.