ever-co / ever-gauzy

Ever® Gauzy™ - Open Business Management Platform (ERP/CRM/HRM/ATS/PM) - https://gauzy.co
https://gauzy.co
GNU Affero General Public License v3.0
2.29k stars 543 forks source link

Fix: Edit (item) row in smart-table #4050

Open dokata99 opened 2 years ago

dokata99 commented 2 years ago

The issue is when we edit something in ng-smart-table we return everything and if in the future we have much bigger data (items). For example 200 templates this will be very slow. So we have to find a way when we edit something the API to return only the updated item and rerender it. Now when I edit something all the date rerenders... This is not correct! I give some example in this video. (this is not only for 'proposals template' - it's almost everywhere we use ng-smart-table).

Video: https://www.loom.com/share/b502a57bb76e49f09f0ea150f66a85fd

dokata99 commented 2 years ago

Links which might help:

https://www.js-tutorials.com/angularjs-tutorial/add-edit-delete-example-using-ng2-smart-angular-4-part-ii/

https://akveo.github.io/ng2-smart-table/#/examples/custom-editors-viewers

https://github.com/akveo/ng2-smart-table/blob/master/projects/demo/src/app/pages/examples/custom-edit-view/custom-filter.component.ts

https://embed.plnkr.co/plunk/GPnUmL