syscoin / blockmarket-desktop-public

Public location for issue reporting on the Blockmarket Desktop public data, built using Syscoin blockchain technology.
http://blockchainfoundry.co
30 stars 25 forks source link

Marketplace results page auto-loads wrong items after viewing subcategories #287

Closed bstr156 closed 6 years ago

bstr156 commented 6 years ago

Using BMD 1.1.4

To replicate the issue, do the following:

  1. Navigate into a category that has subcategories (e.g. Auto/Vehicle) and let it load. For extra measure, go into a subcategory for which there aren't any listings (e.g. RVs/Campers).
  2. Immediately return to the main categories and select a different category (e.g. Alternatives), let it load, then wait a moment and keep watching...

At first the page loads the proper items for the selected category, but then immediately clears and loads items from categories that do not belong.

This behavior seems to be triggered specifically by viewing categories that have subcategories. It also seems to suddenly correct after viewing a few different main categories, until once again going to one with subcategories which manifests the issue again.

dwasyluk commented 6 years ago

This is caused by a race between category requests. What needs to happen is the prev request needs to be cancelled / better managed. Another option is disabling the category nav while a request is in flight and re-enabling it when completed.

We also need to add some kind of loading indication here any time the UI is requesting filtered items or just loading the list for the first time - rather than showing "No Items".

dwasyluk commented 6 years ago

Fixed by @sschepis