Closed CSchmitz81 closed 4 years ago
Needs some changes. Different sort types need different precision levels, so specify it in each dataContainer. The default should be incrementing by 1 for non-decimal numbers. There should also be a check to ensure adding the increment changes the value, because some large numbers won't work due to a lack of precision.
The changes described have now been applied, so this can be reviewed and merged
Force merging due to lack of reviews
I found an issue with sorting Firebase queries where it didn't always return all items. It turns out startAt and endAt treat a 0 numeric value as undefined, so you get the wrong item(s). This is resolved by using the string "0" instead.
I also realized that the step size for numbers used for sorting was implicitly 1, because in cases where we started looking for the next items after a value, we incremented the start value by 1. I resolved this by adding a new step size constant, which will need to align with the number of decimal places used when writing these values, otherwise we may miss some items from the list.