Replies: 1 comment
-
Why not use https://github.com/ngneat/query? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I was wondering what the best practice how to use the elf-store. When im having a overview page I just use the request result and store it with setEntities() and select it with selectAllEntities, or when I have pagination I use
withPagination
...for the detail page i just get the request and store it with
upsertEntity
andactiveID
.. these are the plain practice by my sense.now i have a situation that there is a search option within the same detail page regarding the detail page, example:
detail edit page for Company:
id: xxx(activeId)
parentCompany: [search with typeahead]
So the activated id is easy to get and store... but now I need to store the search-result in the same store (by upserEntities)
Possible solution what i could think of:
activatedEntities
and array and filter out the non-search company (but i have to store the previous active somewhere in code)withUIEntities
to store the ids with the id from the search result and add a prop 'searchResult:true'custom property
that store an array of ids from the latest search resulttrackRequestResult(['company'])
to store the last result (but the data should be only the ones from the latest run, even with cache turned off the data is always selectAllEnitites which include the activeCompanyBeta Was this translation helpful? Give feedback.
All reactions