EntityStore: allow customizing import position

This commit is contained in:
Alex Gleason
2023-04-11 10:04:31 -05:00
parent 0652b2cf57
commit 3d7cccd984
7 changed files with 25 additions and 16 deletions

View File

@ -30,7 +30,7 @@ function useCreateEntity<TEntity extends Entity = Entity, Data = unknown>(
const entity = schema.parse(result.data);
// TODO: optimistic updating
dispatch(importEntities([entity], entityType, listKey));
dispatch(importEntities([entity], entityType, listKey, 'start'));
if (callbacks.onSuccess) {
callbacks.onSuccess(entity);