How to select and combine the only active entity with ui #70
-
Hey, thank you for the Elf library! So i want this
to be like this
This is not a big deal, just feels a little bit dirty, because having withActiveIds() in a huge entity repo that is not supposed to provide multiple activeIds can be confusing. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
This is abuse in my opinion. If you need only one active entity use store.combine({
entity: store.pipe(selectActiveEntity()),
UIEntity: store.pipe(selectActiveEntity({ ref: UIEntitiesRef }))
}).pipe(
map(({ entity, UIEntity })=> ({ ...entity, ...UIEntity}))
) |
Beta Was this translation helpful? Give feedback.
This is abuse in my opinion. If you need only one active entity use
selectActiveEntity
. Then, you can do it manually: