Skip to content

[Sort] Animations not playing correctly #10088

Closed

Description

@tapinambur0508

Bug, feature request, or proposal:

Bug

What is the expected behavior?

When I use the mat-table in mat-tabs from the second tab, I see the arrows near the title, such as the letter 'T'. This is screenshots:
https://screenshots.firefox.com/XsFnYw8HvjZM6C09/localhost
https://screenshots.firefox.com/zAATrJyduZkoSGyz/localhost
Everything works fine on the version 5.1.1

Which versions of Angular, Material, OS, TypeScript, browsers are affected?

Material 5.2.2. Browser: FF 58, Chromium 64

Activity

  1. julianobrasil commented on Feb 22, 2018

    @julianobrasil
    Contributor

    It seems to be related to this #5269 (comment)

  2. tapinambur0508 commented on Feb 22, 2018

    @tapinambur0508
    Author

    Does it work only in material 6.0?

  3. julianobrasil commented on Feb 22, 2018

    @julianobrasil
    Contributor

    It's a new feature. It needs material >= 6.0.0-beta.0

  4. tapinambur0508 commented on Feb 22, 2018

    @tapinambur0508
    Author

    Do you fix this trouble in material 5?

  5. julianobrasil commented on Feb 22, 2018

    @julianobrasil
    Contributor

    In that topic I linked above there are some workarounds. @lula's seemed to be the preferred one.

  6. NorseJedi commented on Mar 7, 2018

    @NorseJedi

    I can confirm this issue, and it doesn't seem like the workaround posted in #5269 solves this specific issue. I've tried putting an *ngIf as suggested there on both a containing div and on the table itself, but the T-s still show up when switching to the tab containing the table.

    Seems what happens is that the style of the div element containing the arrows does not get it's opacity- and transform- values set.

    The issue seems to happen only if the table is not on the first (i.e. initial) tab.

    I was using angular 5.2.0 and material 5.2.1, but after updating to angular 5.2.7 and material 5.2.4 the issue is the same.

    I also tried upgrading material (and cdk) to 6.0.0-beta.2, still with angular 5.2.7, but the issue remains even there, while the issue described in #5269 is said to be fixed in that version.

  7. tapinambur0508 commented on Mar 7, 2018

    @tapinambur0508
    Author

    I fixed that issue by added in main css file this:

    .mat-sort-header-arrow {
      opacity: 0;
    }
    
    .mat-sort-header-pointer-left {
      transform: rotate(-45deg);
    }
    
    .mat-sort-header-pointer-right {
      transform: rotate(45deg);
    }
    
  8. julianobrasil commented on Mar 7, 2018

    @julianobrasil
    Contributor

    @ensnared, it looks like normal here (material 6 beta.2): https://stackblitz.com/edit/angular-19yihc-xbntvx

  9. NorseJedi commented on Mar 7, 2018

    @NorseJedi

    @julianobrasil, that code is not using the mat-table component, only sorting functionality on a normal table. If you look here, you'll see the issue persists - I forked your code so the package versions are the same:
    https://stackblitz.com/edit/angular-19yihc-anlvte

    The table on the initial tab looks fine, the table on the second tab does not, but the code for both tables is identical.

    @tapinambur0508 Thank you, that workaround does the trick, and with no apparent side-effects as far as I can tell :)

  10. tapinambur0508 commented on Mar 15, 2018

    @tapinambur0508
    Author

    @julianobrasil, could you insert my solution of this problem in next version of angular/material if it's possible? I simply copy sort header arrow style form version 5.1.1

  11. julianobrasil commented on Mar 15, 2018

    @julianobrasil
    Contributor

    Oh, it's not up to me this kind of thing. The actual members of material team are the ones who are responsible for these decisions. In this case, I think @andrewseguin could give you more info.

  12. tapinambur0508 commented on Mar 16, 2018

    @tapinambur0508
    Author

    @andrewseguin, could you add my changes for sort arrow in next release angular?

  13. changed the title [-]Trouble with arrows if use mat-table in mat-tabs[/-] [+][Sort] Animations not playing correctly for projected content[/+] on Apr 23, 2018
  14. changed the title [-][Sort] Animations not playing correctly for projected content[/-] [+][Sort] Animations not playing correctly[/+] on Apr 23, 2018
  15. added
    P3
    on Apr 23, 2018
  16. vadost commented on May 3, 2018

    @vadost

    @tapinambur0508 Your solution doesn't work correctly if you set initial sorting for the table, in this case one icon should be visible

  17. vadost commented on May 3, 2018

    @vadost

    @andrewseguin When can you fix it?

  18. tapinambur0508 commented on May 4, 2018

    @tapinambur0508
    Author

    @vadost, you can use version 5.1.1 if it's not critical for you

  19. removed their assignment
    on Jun 3, 2023
  20. added 2 commits that reference this issue on Nov 21, 2024
    6fad88d
    775c7ce
  21. added a commit that references this issue on Nov 27, 2024
    1235ad2
  22. added a commit that references this issue on Nov 27, 2024
    a08eeeb
  23. angular-automatic-lock-bot commented on Dec 28, 2024

    @angular-automatic-lock-bot

    This issue has been automatically locked due to inactivity.
    Please file a new issue if you are encountering a similar or related problem.

    Read more about our automatic conversation locking policy.

    This action has been performed automatically by a bot.

  24. locked and limited conversation to collaborators on Dec 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3area: material/sort

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions