-
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
Document limitation of matRipple on native table rows and possible solutions #11883
Comments
Actually that's a different issue than #11165. The issue seems to be that Meaning that the ripples won't have the proper positions. Also |
Have exactly the same problem. Any workrounds here? |
A workaround would be using |
I have faced the same problem too and it would be nice to have a fix for this. |
Also have the same issue. |
I am having the same issue as well, but |
That works for me. :) |
Using Material 7.0.1 - I still experience this issue. |
I believe this is because Opinion
|
@rocos-yishi solution worked for me. It would be nice if it were added to the Examples section for Table on the Angular Material website. |
@MatthiasKunnen Using the |
Still not working? You probably forgot |
@simeyla thats the exact cause.. ripple is working fine for me even on tr. |
@gautamkrishnar It's not working for me either, and @MatthiasKunnen's comment does make sense to me. |
Any valid workaround on the |
@MicMicMon, have you tried using the flex version of the table? I'm using that in a project and matRipple works for me. If you have buttons in the row, you need to work some magic to disable the ripple effect from being propagated by the buttons, but other than that it seems to work. See this link for more info: https://material.angular.io/components/table/overview#tables-with-code-display-flex-code- |
Thanks @spyter Actually, because of the warning in the docs, and all the good reasons listed here, I wanted to stick with the |
When i used like u said then sticky scenario will broken Sorry for bad english |
2 years after the original issue, Angular 9 still has this issue... |
@QuickScoP3s Do you have any proposal in mind? This is a limitation in browsers we are hitting due to our ripple implementation. There is not much we can do about this. Given there is a reasonable solution of using the non-native table when needing ripples, I'm closing this issue. Here is an alternative example that shows how to make ripples work for native table-rows: https://stackblitz.com/edit/comp-11883?file=app/app.component.html. |
I didn't mean to sound rude (apologies if I did), but since the issue was still open, I though the team was still working on it. I've been using the approach to work around the problem, as suggested, with the downside being the sticky headers not working... I'd loved seeing a solution as I originally wanted to use sticky headers 😉 I had no idea that the table itself was the limiting factor, but thanks for clearing this up! |
@QuickScoP3s No worries at all! Sorry if the state of the issue was unclear. I think we failed communicating clearly why this hasn't been resolved yet. Hopefully my latest message is clear enough. I've also created a demo StackBlitz that shows how ripples can be used together with native tables. That might be helpful to some people. |
@devversion StackBliz demo works as advertised. If this issue is not easily solvable your work around should be discoverable from the docs. Would save a bit of hair pulling ;) Edit: |
@Spencer-Easton Sounds reasonable. I'll re-open this as we could certainly have this documented in the ripple overview. Any help on this would be appreciated as it's most likely low-priority for us. |
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:
Bug
What is the expected behavior?
The ripple effect should be contained within the table row.
What is the current behavior?
When using
<tr mat-row>
in Angular 6 instead of<mat-row ...>
, the ripple effect isn't contained within its parent container. I believe this is caused by the fact thatdiv
(the container used for the ripple) is not a valid child of thetr
element it's applied to.What are the steps to reproduce?
https://stackblitz.com/edit/angular-material2-issue-myteuk
What is the use-case or motivation for changing an existing behavior?
N/A
Which versions of Angular, Material, OS, TypeScript, browsers are affected?
Angular 6.x
The text was updated successfully, but these errors were encountered: