Skip to content
This repository has been archived by the owner on Sep 24, 2019. It is now read-only.

Cannot display evidence for facet with one result #39

Open
abargnesi opened this issue Dec 18, 2015 · 1 comment
Open

Cannot display evidence for facet with one result #39

abargnesi opened this issue Dec 18, 2015 · 1 comment
Assignees
Labels

Comments

@abargnesi
Copy link
Member

If you click on a facet with a single value you will get No results.

Steps to reproduce:

  1. Load up the search page.
  2. Click on a facet with a single value.
  3. See the No results text. You can see that the GET /api/evidence request passes start=1 which will skip that first result.

This is because this.searchStart will be set to 1 after the initial search is done. See this code.

@abargnesi abargnesi added the bug label Dec 18, 2015
abargnesi pushed a commit that referenced this issue Dec 18, 2015
Changed the signature to search(start) which will set this.searchStart
if the value is not undefined. A 0 is passed when a facet select is
made.

This addressed the issue without causing a regression with paging,
though I feel like the issue is in the paging calculation in the api
search promise success case.

refs #39
@abargnesi
Copy link
Member Author

This addresses the fix, but I think the issue lies in the paging calculation here. The searchStart property seems to be used for both evidence_collection state and display. These two uses are at odds since the pager is 0-based.

We might want to make the server side 1-based to match the use on the client. Thoughts?

@wshayes wshayes self-assigned this Dec 18, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants