angular-cdk

Using Virtual Scroll in Angular Material 2 Table with @angular/cdk-experimental

折月煮酒 提交于 2021-02-05 20:00:16
问题 I have a table displays so many rows, I want to optimize the performance of it. I've found a solution by using Virtual Scroll technique. Here is an example of Angular Material CDK Vritual Scroll Viewport Component with a simple div I've found: <cdk-virtual-scroll-viewport class="list-container lg" [itemSize]="52.5"> <div *cdkVirtualFor="let state of statesObservable | async;" class="list-group-item"> <div class="state">{{state.name}}</div> <div class="capital">{{state.capital}}</div> </div> <

Using Virtual Scroll in Angular Material 2 Table with @angular/cdk-experimental

旧街凉风 提交于 2021-02-05 19:59:57
问题 I have a table displays so many rows, I want to optimize the performance of it. I've found a solution by using Virtual Scroll technique. Here is an example of Angular Material CDK Vritual Scroll Viewport Component with a simple div I've found: <cdk-virtual-scroll-viewport class="list-container lg" [itemSize]="52.5"> <div *cdkVirtualFor="let state of statesObservable | async;" class="list-group-item"> <div class="state">{{state.name}}</div> <div class="capital">{{state.capital}}</div> </div> <

Using Virtual Scroll in Angular Material 2 Table with @angular/cdk-experimental

可紊 提交于 2021-02-05 19:59:27
问题 I have a table displays so many rows, I want to optimize the performance of it. I've found a solution by using Virtual Scroll technique. Here is an example of Angular Material CDK Vritual Scroll Viewport Component with a simple div I've found: <cdk-virtual-scroll-viewport class="list-container lg" [itemSize]="52.5"> <div *cdkVirtualFor="let state of statesObservable | async;" class="list-group-item"> <div class="state">{{state.name}}</div> <div class="capital">{{state.capital}}</div> </div> <

Virtual Scroll - enabled on condition

懵懂的女人 提交于 2021-01-05 08:41:29
问题 I'm working on big data tables and I need to have oportunity to set dynamic if I want to use virtual scroll or standard solution. On my prototype I used *ngIf and duplicated views for standard body and cdk virtual scroll vierport. Is there any possibilty to just disable virtual scroll, without building additional components for alternate views? Thanks in advance! 回答1: I believe you are asking for adding the virtual scroll directive based on a condition. In that case, it cannot be done at the

Virtual Scroll - enabled on condition

被刻印的时光 ゝ 提交于 2021-01-05 08:40:25
问题 I'm working on big data tables and I need to have oportunity to set dynamic if I want to use virtual scroll or standard solution. On my prototype I used *ngIf and duplicated views for standard body and cdk virtual scroll vierport. Is there any possibilty to just disable virtual scroll, without building additional components for alternate views? Thanks in advance! 回答1: I believe you are asking for adding the virtual scroll directive based on a condition. In that case, it cannot be done at the

Angular CDK - issue with scrolling and dragging element inside nested scrollable div

人走茶凉 提交于 2020-12-29 05:51:31
问题 Prerequisite: cdk draggable elements inside a nested scrollable div (see the example https://stackblitz.com/edit/angular-7y19nm?file=app/cdk-drag-drop-sorting-example.html) How to reproduce: Start dragging an item -> scroll the page -> drag item a bit more when not scrolling Effect: item placeholder stays in wrong place and it's basically impossible to drag item anywhere outside the viewport. <div style="height: 100vh; overflow-y: auto"> <div cdkDropList class="example-list"

Angular CDK - issue with scrolling and dragging element inside nested scrollable div

和自甴很熟 提交于 2020-12-29 05:50:12
问题 Prerequisite: cdk draggable elements inside a nested scrollable div (see the example https://stackblitz.com/edit/angular-7y19nm?file=app/cdk-drag-drop-sorting-example.html) How to reproduce: Start dragging an item -> scroll the page -> drag item a bit more when not scrolling Effect: item placeholder stays in wrong place and it's basically impossible to drag item anywhere outside the viewport. <div style="height: 100vh; overflow-y: auto"> <div cdkDropList class="example-list"

Angular CDK - issue with scrolling and dragging element inside nested scrollable div

狂风中的少年 提交于 2020-12-29 05:49:07
问题 Prerequisite: cdk draggable elements inside a nested scrollable div (see the example https://stackblitz.com/edit/angular-7y19nm?file=app/cdk-drag-drop-sorting-example.html) How to reproduce: Start dragging an item -> scroll the page -> drag item a bit more when not scrolling Effect: item placeholder stays in wrong place and it's basically impossible to drag item anywhere outside the viewport. <div style="height: 100vh; overflow-y: auto"> <div cdkDropList class="example-list"

Drag and Drop in Angular on complex board (matrix)

柔情痞子 提交于 2020-12-08 02:03:32
问题 So I want to make my version of the Battleships game in Angular and to do that I need a 10x10 matrix in which I can drag and drop the ships ( if you played the game you know what I am talking about ) and I'm using the Angular Cdk but I cannot make it work at all. What I have tried so far is make a table out of divs, ships elements aside and drag and drop them on the board but I can't connect the two arrays because the array of ships is not nested and the board is. Edit: Here is the link to

Drag and Drop in Angular on complex board (matrix)

只谈情不闲聊 提交于 2020-12-08 02:02:55
问题 So I want to make my version of the Battleships game in Angular and to do that I need a 10x10 matrix in which I can drag and drop the ships ( if you played the game you know what I am talking about ) and I'm using the Angular Cdk but I cannot make it work at all. What I have tried so far is make a table out of divs, ships elements aside and drag and drop them on the board but I can't connect the two arrays because the array of ships is not nested and the board is. Edit: Here is the link to