firebase database order by value working wrong

前端 未结 2 965
清歌不尽
清歌不尽 2021-01-27 03:23

So I have a database of stores and each store has a number in front of its name. They are added in a random order, but I want them displayed in order from 1 to 213. My problem i

2条回答
  •  星月不相逢
    2021-01-27 04:23

    The leading zeros may be a temporary solution but in regard of users experience this is wrong. You have to implement a sorting function. Moreover, if your system will have to deal with more than 999 stores, you won't have to touch your code for this.

提交回复
热议问题