Questions tagged [createentityadapter]

25 questions
0
votes
1 answer

How to shape state on NGRX for master-detail pattern

Let's say I am developing a small app for managing tasks. The app uses angular and NGRX to manage the state. The user load the tasks every morning and go on different addresses to perform the tasks. The app implements the master-detail pattern - I…
0
votes
0 answers

how to add a number to a property of entity created by createEntityAdapter

I am trying to add time to the property Elapsed time of entity created by createEntityAdapter, but it's not being updated I am trying this , i writing code for only this reducer function const reducers={ updateTime(state, actions) { const {…
0
votes
0 answers

It is possible to initialize reduce toolkit entityManager in action and use it?

I would like to initialize my EntityAdapter from an action an use it in the same action I have an Order object with lines in my state. I want to use an entityAdapter for the lines but if the user don't start an order, Order is null The order is not…
PatAfixer
  • 1
  • 1
0
votes
1 answer

EntityAdaper's method updateMany doesn't update state, even though addMany works fine, what is the reason?

I made an application in which the user passes coordinates. The function makes a request to the server according to the given coordinates and looks for the nearest available establishments. Further, the data is transferred to the formatter and…
tresor13
  • 57
  • 8
0
votes
0 answers

how to solve entitiyAdapter errors

How to solve The entity passed to the selectId implementation returned undefined. You should probably provide your own selectId implementation. The entity that was passed: < The selectId implementation: function (instance) { return…
Maru
  • 1
  • 1
0
votes
1 answer

ReduxToolKit | CreateEntityAdaptor userSelectors.selectAll giving Cannot read properties of undefined (reading 'map')

Hi i am using ReduxToolKit CreateEntityAdaptor for crud, when i get all users from API by using userSelectors.selectAll, it gives "Cannot read properties of undefined (reading 'map')". let me show my API response. { "data": [ { …
0
votes
1 answer

How to handle errors when using createEntityAdapter in redux-toolkit?

I have a question. So, I'm new to react and now I'm working in a project. I use redux-toolkit to handle my states and I'm also using createEntityAdapter to set Initial state, and the question is this: how can I handle error when using…
0
votes
0 answers

Array.Map() is changing state without using return value

I am coding along with the Redux Essentials tutorial. When I run notificationArray.map without using the return value, my state is updated per the map functions callbacks. I.e. in allNotifiicationsRead, each notifications's read property is set to…
0
votes
1 answer

ReduxToolikt entity adapter question: how do i define the selectId type for update?

I am learning how to use createEntityAdapter in a working example and I can't resolve the selectId for Update functions correctly. Working sandbox: https://codesandbox.io/s/createentityadapter-demo-forked-5rvl4 The entityAdapter is initialised…
Laurence Fass
  • 1,614
  • 3
  • 21
  • 43
0
votes
1 answer

React redux-toolkit createEntityAdapter setAll usage

I retrieve an array from database and set it to my slice. [ { id: 'a01', name: 'name01' }, { id: 'a02', name: 'name02' }, { id: 'a03', name: 'name03' } ]; Users change the order with a user interface. When they change the order of the objects…
Er.Se
  • 461
  • 3
  • 11
1
2