tectonic
tectonic copied to clipboard
Data ordering is not retained from REST endpoint data ordering when fetching a LIST
This seems to be a small bug with how the data is stored. If we fetch the following two REST endpoints back to back:
/stops?ids=1&ids=2&ids&=3
returns => [1,2,3]
/stops?ids=3&ids=2&ids&=1
returns => [1,2,3]
even though the API returns [3,2,1]
Hmm, thanks for the heads up, sorry that bug's hitting you. Going to take a look at the reducer and see how we're storing this.
Tectonic is meant to store the IDs that the query returns separately from the data such that we can always ensure ordering when injecting props (https://github.com/tonyhb/tectonic/issues/6). There must be an issue with either determining the ID order, saving the ID order, or rebuilding the ID order from the cache and reducer.
Poking around now.