components icon indicating copy to clipboard operation
components copied to clipboard

MatSort tables have broken sort icons in non-active tabs

Open rfuhrer opened this issue 8 years ago • 6 comments

Bug, feature request, or proposal:

Bug

What is the expected behavior?

Sort icons should be invisible until you mouse over or select a column

What is the current behavior?

It works fine on the current tab, however any non-active tabs will have this broken "T" shape on each column until you mouse over

What are the steps to reproduce?

Click Tab 2: https://stackblitz.com/edit/angular-19yihc

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

Angular CLI: 1.7.1
Node: 9.5.0
OS: win32 x64
Angular: 5.2.6
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, platform-server, router

@angular/cdk: 5.2.3
@angular/cli: 1.7.1
@angular/flex-layout: 5.0.0-beta.13
@angular/material: 5.2.3
@angular-devkit/build-optimizer: 0.3.2
@angular-devkit/core: 0.3.2
@angular-devkit/schematics: 0.3.2
@ngtools/json-schema: 1.2.0
@ngtools/webpack: 1.10.1
@schematics/angular: 0.3.2
@schematics/package-update: 0.3.2
typescript: 2.7.2
webpack: 3.11.0

rfuhrer avatar Feb 28 '18 00:02 rfuhrer

The new <ng-template matTabContent></ng-template> surrounding <mat-tab> content solves it.

Demo: https://stackblitz.com/edit/angular-19yihc-xbntvx

julianobrasil avatar Feb 28 '18 00:02 julianobrasil

Interesting. I thought I've been keeping up on everything in https://github.com/angular/material2/blob/master/CHANGELOG.md but I guess I missed the ng-template stuff. Can you point me in the direction of where you learned that?

rfuhrer avatar Feb 28 '18 01:02 rfuhrer

It's been around since 6.0.0-beta.0 (not so long). You can read about it at https://github.com/angular/material2/blob/master/src/lib/tabs/tabs.md

julianobrasil avatar Feb 28 '18 03:02 julianobrasil

Awesome, thanks! I've been ignoring the 6.0.0 changelog since I'm still on version 5 so I must have missed this.

rfuhrer avatar Feb 28 '18 03:02 rfuhrer

Is there a workaround for @angular/[email protected] (I´m on 5.2.5)

I don´t really want to switch major version unplannend within the development of a new increment.

ChristophWieske avatar Jun 11 '18 11:06 ChristophWieske

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.