akita icon indicating copy to clipboard operation
akita copied to clipboard

Update a single entity in paginator

Open ItaiYosephi opened this issue 3 years ago • 5 comments

I'm submitting a...


[ ] Regression (a behavior that used to work and stopped working in a new release)
[ ] Bug report  
[ ] Performance issue
[x] Feature request
[ ] Documentation issue or request
[ ] Support request
[ ] Other... Please describe:

Current behavior

Can't update single entity. PagintorPlugin.selectPage() is not reactive.

Expected behavior

Ability to update a single entity.

Minimal reproduction of the problem with instructions

For bug reports please provide the STEPS TO REPRODUCE and if possible a MINIMAL DEMO of the problem via https://stackblitz.com or similar (you can use this template as a starting point: https://stackblitz.com/github/NetanelBasal/akita-issue-seed).

What is the motivation / use case for changing the behavior?

Environment


Angular version: X.Y.Z


Browser:
- [ ] Chrome (desktop) version XX
- [ ] Chrome (Android) version XX
- [ ] Chrome (iOS) version XX
- [ ] Firefox version XX
- [ ] Safari (desktop) version XX
- [ ] Safari (iOS) version XX
- [ ] IE version XX
- [ ] Edge version XX
 
For Tooling issues:
- Node version: XX  
- Platform:  

Others:

ItaiYosephi avatar Jun 02 '21 17:06 ItaiYosephi

https://github.com/datorama/akita/issues/247#issuecomment-509495734

You may have a server-side sorting.

NetanelBasal avatar Jun 02 '21 17:06 NetanelBasal

#247 (comment)

You may have a server-side sorting.

I'm not sure how sorting is related. Let's say I have a list of todos, and the user mark one of them as completed. We would do an api call to server and get updated todo. Is there a way to insert this updated entity and avoid refreshing the whole page?

ItaiYosephi avatar Jun 02 '21 18:06 ItaiYosephi

It means that you can have a server-side sorting based on one of the properties, and we currently can't know it.

Is there a way to insert this updated entity and avoid refreshing the whole page

Currently, no. You can create a PR, and add this feature.

NetanelBasal avatar Jun 02 '21 18:06 NetanelBasal

I'll give it a shot. I get circular dependency error when I run yarn build:libs. i think line 6 in akita-ng-entity-service.loader.ts is causing the issue

ItaiYosephi avatar Jun 03 '21 10:06 ItaiYosephi

Fixed. You can try now

NetanelBasal avatar Jun 11 '21 05:06 NetanelBasal