Why the table execute all functions when it's created?
- Ngôn ngữ chính
- TypeScript
- Star
- 1.6k
- Fork
- 867
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
_**Premise**_ I have little experience with Angular, but I think my problem it concerns **_Angular lifecycle hooks_**.
I'have a SmartTable component, it gets the data from api REST from server.
When I entry for the first time in the page, I've noticed that are _executed_ all function that I've defined in the smarttablecomponent.**ts**.
This behavior is critical in my scenario, since I need to invoke other api RESTs, for example when an User click on the Row I get other data from server... But these happens at the first access when the view is created. Why? I've omitted something?
Thanks, and I take this opportunity to congratulate with **akveo Team**!
**### EDIT**: I've resolved strange behavior. Changing the property of **_ng-smart-table_** tag from:
`(rowSelect)="onUserRowSelect($event)"`
to
`(userRowSelect)="onUserRowSelect($event)"`
In ths way when the view is exactly how I expect it to be: no rest call executed and no UI components created involuntarily
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Đánh giá
Issue này chưa được đánh giá.