-
Notifications
You must be signed in to change notification settings - Fork 6.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Table] Possibility to add html in between table rows ? #5936
Comments
I'm also trying to implement a table where clicking on a row will expand in an another table. Any suggestions are welcome. |
@vasslehel-c Yeah.. That's what i am looking for. Expand/Collapse row child. |
Please keep GitHub issues for bug reports / feature requests. Better avenues for troubleshooting / questions are stack overflow, gitter, mailing list, etc. |
We should ask people who probably have no idea instead of the people who actually made and know the tool if something is possible ? That doesn't sound great. |
Here is a very brittle example of how you might achieve this: https://plnkr.co/edit/ZL6OnWwVmOCPYetp96XX?p=preview However I do wish that this was a little easier. @jelbourn could you comment on whether this is the best approach? As @Lakston alluded to, once people in the community understand how to work with the table, SO/Gitter questions will actually get correct answers. But for now, there's a lot of confusion out there, and certainly no information regarding this particular topic. |
Our thinking is that stuff like this should go into the row itself; we need to be very restrictive about the structure around the rows because it affects how we do sticky columns and virtual scrolling down the line. |
Thanks @willshowell I didn't even know about the I understand @jelbourn 's concerns and the team obviously have a better view of where they want the component to go and how to add such features, we are probably asking for features way to fast but that's your fault, you made an awesome tool and we are excited to use it ! |
I tried the example referenced by @willshowell and I was able to notice issues in terms of inserted html (which will appear as sibling to the row selected) not always showing bellow that row. This happens when a row is selected after sort or pagination is applied to the table. Any one has a suggestion as to how to ensure the additional html appears bellow the row consistently or if there are alternative approaches to implement row expansion reliably? |
@samcod check the discussion in #6095. The approach used there is much more reliable. (example in #6095 (comment)) |
Thank you! |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Bug, feature request, or proposal:
More of a question if this is possible or not.
What is the expected behavior?
I would like to be able to add markup below each row so I can show it conditionally on row click so it would behave like an accordion. Additional infos would be contained in a div with an ngIf and triggered on row click.
To illustrate what I am trying to achieve :
What is the current behavior?
The cdk docs states
Any content placed inside of the header row or data row template will be ignored, as the rendered content of the row comes from the cell templates described above.
so it seems that what I'm trying to achieve is not possible.What are the steps to reproduce?
As stated in the docs any attempt to add markup between the
md-row
tags will be ignored.The text was updated successfully, but these errors were encountered: