ngneat / elf

🧙‍♀️ A Reactive Store with Magical Powers

Home Page:https://ngneat.github.io/elf/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

UIEntities unionEntities() doesn't work with custom idKey provided

Exslims opened this issue · comments

Which @ngneat/elf-* package(s) are the source of the bug?

store, entities

Is this a regression?

Yes

Description

Hey!
If I provide custom idKey I can select UI entity data as expected, but combine with unionEntities() seems not working.

Please provide a link to a minimal reproduction of the bug

https://stackblitz.com/edit/mvwxfe?file=index.ts

Please provide the exception or error you saw

No response

Please provide the environment you discovered this bug in

No response

Anything else?

No response

Do you want to create a pull request?

No

you need to pass the idKey

@NetanelBasal Hi! What do you mean? I did it on stackblitz

const todosStore = createStore(
  { name: 'todos' },
  withEntities<Todo, 'newId'>({idKey: 'newId'}),
  withUIEntities<TodoUI, 'newId'>({idKey: 'newId'})
);
  .pipe(unionEntities('newId'))