akveo / ng2-smart-table

Angular Smart Data Table component
https://akveo.github.io/ng2-smart-table/
MIT License
1.63k stars 875 forks source link

Can we have nested smart table to show details of a row. #511

Open kcadella opened 7 years ago

kcadella commented 7 years ago

I have a smart table listing consumers and on click want to expand the row and show their order activity in details.

Can you point me to how to achieve this.

RachelYang2 commented 7 years ago

I have the same goal. Any ideas???

kcadella commented 7 years ago

@RachelYang2 Hello rachel am doing using custom buttons for each functionality and using modal's as child component.

rbetancor commented 7 years ago

@kcadella I'm doing the same, but could be nice if we have the ability to do a 'row expand' and put another smart-table there with the info you need to show, instead of a modal ... more like most of today web-app are done.

kcadella commented 7 years ago

@rbetancor Yup agreed, Hey I have encountered an issue see if you found any resolution. In the modal I have another smart table where I set the source but the table rows are not generated until I click on something else in the modal which displays the table with the rows. Very Strange.

kcadella commented 7 years ago

@nnixaa Hello Dmitry did you guys encounter this scenario. I am opening a modal from a smart table custom button and passing an array object. The modal has a smart table and source is set to the array am passing but the rows are not generated untill some other event is triggered on the component. like a click on a input box or something. Tried almost everything but not working.

rbetancor commented 7 years ago

@kcadella it's an eventPropagation issue ... when you click on the button that open the modal, the modal object itself its eating the events, so really, it doesn't matter if you fill the smart-table on the ngOnInit of the modal ... they will not fill-up. I remember I see that before, but I don't remember how I fixed, and now I'm working on the expandable rows, just to avoid the modal usage for that, and use modal only for confirmations or things like that.

lopenchi commented 6 years ago

@rbetancor do you have the solution with expandable rows?