Skip to content

Conversation

@firefinchdev
Copy link
Contributor

Done
@abhishek97 Pls Review.

@firefinchdev
Copy link
Contributor Author

Solves #2

yield timeout(250)
const questions = yield this.get('store').query('question', {
include: 'user',
page: {
Copy link
Contributor

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.

Copy link
Contributor Author

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

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.

Copy link
Contributor Author

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).

@firefinchdev
Copy link
Contributor Author

@abhishek97
Requested changes done.

@abhishek97
Copy link
Contributor

@firefinchdev The functionality works fine. Just place the search box in a new line and center align with an appropriate title.

@firefinchdev
Copy link
Contributor Author

Done
@abhishek97

@abhishek97 abhishek97 merged commit 8306060 into coding-blocks:master Jul 21, 2018
@firefinchdev firefinchdev deleted the filter-ques branch July 22, 2018 08:21
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.

2 participants