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

react-search-refiners - Search Pagination - Not working properly #299

Open
1 of 3 tasks
mmohamedbasith opened this issue Sep 21, 2019 · 5 comments
Open
1 of 3 tasks

Comments

@mmohamedbasith
Copy link

mmohamedbasith commented Sep 21, 2019

Category

  • Question
  • Bug
  • Enhancement

Expected or Desired Behavior

Clicking on pagination number , should take us to the relavent page results.

Observed Behavior

Clicking on pagination number , always loads the first page and rarely loads correct page.

Steps to Reproduce

1.Insert search result webpart and paginzation webpart
2. Set datasource connections.
3.Search for *
4.Paginzation loads , click on page 3. (It will reload the page 1 ,rarely loads correct page)

@mmohamedbasith mmohamedbasith changed the title Search Pagination - Not working properly react-search-refiners - Search Pagination - Not working properly Sep 21, 2019
@wobba
Copy link
Contributor

wobba commented Sep 23, 2019

I cannot reproduce this and need more information on how to reproduce. Which version are you using? Which browser? If you look at the network trace when clicking, do you see anything weird in the query JSON being sent?

@mmohamedbasith
Copy link
Author

mmohamedbasith commented Sep 24, 2019

@wobba I downloaded the latest code . Ran npm install and then gulp serve .
Browser - Chrome
In workbench , added the searchresult webpart and search pagination webpart . configured the data source connection on each web part.
No Errors in network trace.
I tried to debug. On click of pagination page number , i see correct page is getting set in below line (in searchResultsWebpart.ts ) and it loads the correct page.

const paginationSourceData: IPaginationSourceData = this._paginationSourceData.tryGetValue();

However this line is again called with value of selected page as 1 (paginationSourceData={selectedPage:1}) . Somewhere selectedPage is reset to 1 again and load the first page all the time.

In Network Trace ,
Four times search query is getting hit (/_api/search/postquery) .Only on second request 'StartRow' atrribute is carried in request . Rest not having the attribute leading to load the first page.

@wobba
Copy link
Contributor

wobba commented Sep 24, 2019

@mmohamedbasith can you build and deploy to isolate if this is a workbench issue or not (which I haven't tested in)

@mmohamedbasith
Copy link
Author

@wobba Yes , when i deployed and checked in a page it is working fine.However I can replicate the issue when i keep the page in edit mode (sometimes works , sometime not)

@wobba
Copy link
Contributor

wobba commented Sep 24, 2019

@mmohamedbasith ok, so an edit mode issue. I'll see if I can address it, but not super important if paging works in edit mode imo.

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

No branches or pull requests

2 participants