-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Entity sorting after updates is not stable #2297
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I encountered the same problem. Please see this example. |
This should actually be fixed now in #2464 and will be out in whatever the next patch or minor release is. |
i encountered same problem as well. Before i'm using and it gives me an error. After: |
@Moglie2817 : what version of RTK are you using? This was fixed in 1.8.3. |
@markerikson : i'm using version 1.8.1. |
I get squigglies under date but it works! When will this be fixed or am I doing s/thing wrong!?! const postsAdapter = createEntityAdapter({ Property 'date' does not exist on type '{ id: EntityId; }'.ts(2339) |
@Mac-DevOSYandex you haven't provided an entity type. const postsAdapter = createEntityAdapter<Post>({
sortComparer: (a, b) => b.date.localeCompare(a.date)
}); |
Per https://www.reddit.com/r/reduxjs/comments/ud58hg/sortcomparer_in_rtk_switches_the_ordering_of/ :
My analysis:
The text was updated successfully, but these errors were encountered: