angular-cdk

Style not loaded in new window

点点圈 提交于 2020-12-05 11:45:32
问题 I reproduced the problem with minimal code on this Stackblitz . I made part of my component open on a new window BUT it should still be able to interact with my main app. I used DomPortalHost to achieve that. The interaction works successfully but the style are not loaded into the new window. How do I force the new window to match the style of the main app? The main app The window: 回答1: Your modal window does not contain the CSS styles of the parent window. So you have to clone them yourself

Style not loaded in new window

↘锁芯ラ 提交于 2020-12-05 11:40:24
问题 I reproduced the problem with minimal code on this Stackblitz . I made part of my component open on a new window BUT it should still be able to interact with my main app. I used DomPortalHost to achieve that. The interaction works successfully but the style are not loaded into the new window. How do I force the new window to match the style of the main app? The main app The window: 回答1: Your modal window does not contain the CSS styles of the parent window. So you have to clone them yourself

How to set the initial index (position) for the CdkVirtualScrollViewport in Angular 7

不羁岁月 提交于 2020-08-07 01:26:31
问题 I need the inital position of the cdk-virtual-scroll-viewport to be other than the first element / item of the list. Now I found the scrollToIndex and scrollTo methods, but I only can get them to work when using it in the ngAfterViewChecked , which feels off. Can someone confirm that the using those methods in the ngAfterViewChecked is the right way of doing things? If not, show an alternative method / technique? @ViewChild(CdkVirtualScrollViewport) cdkVirtualScrollViewport:

Multi-select with cdk-virtual-for making it look like nothing was selected

岁酱吖の 提交于 2020-07-21 07:03:18
问题 I have a couple of angular material multi-selects that are utilizing the new Virtual for in the CDK. When you select a couple of items and scroll them out of view, thus dropping them from the virtual for and then close the select, it looks like the inputs were dropped, but when opening up the select and scrolling back up you see they are still selected. Here is an imgur album displaying my issue: https://imgur.com/a/8CVXulD The only workaround I've been able to come up with is that I can

Mat Sort Issue for Numbers and Text Columns

冷暖自知 提交于 2020-07-20 17:37:04
问题 I have angular material datasource. angular material version is ^5.0.3 Sorting is working. However for some columns it is sorting incorrectly. where number and text is there. For instance, sorted result like, 'XXX', '1', '1tesxt', '1', 'OPD', OXD', '12'. <mat-table #table [dataSource]="dataSource" matSort > <ng-container matColumnDef="model"> <mat-header-cell *matHeaderCellDef mat-sort-header> Model </mat-header-cell> <mat-cell *matCellDef="let element"> {{element.model}} </mat-cell> </ng