You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sorting enums based on their values appears to be unattainable at present. Instead, they are sorted by their names, which may suit certain scenarios but can be cumbersome for others.
The solution you'd like
Given the example below, I aim to have the statuses sorted based on their values. Hence, when queried, I anticipate seeing entries in the order of Open, Pending, and Closed.
publicenumStatus{Open=0,Pending=1,Closed=2}
Currently, enums are sorted alphabetically by their names. Consequently, the resulting sort order for entries would be Closed, Open, Pending, which is not preferred in this context.
The text was updated successfully, but these errors were encountered:
Product
Hot Chocolate
Is your feature request related to a problem?
Sorting enums based on their values appears to be unattainable at present. Instead, they are sorted by their names, which may suit certain scenarios but can be cumbersome for others.
The solution you'd like
Given the example below, I aim to have the statuses sorted based on their values. Hence, when queried, I anticipate seeing entries in the order of Open, Pending, and Closed.
Currently, enums are sorted alphabetically by their names. Consequently, the resulting sort order for entries would be Closed, Open, Pending, which is not preferred in this context.
The text was updated successfully, but these errors were encountered: