From cc5b0d74e47d9e59ee7aa51dde6ad04e6325fed3 Mon Sep 17 00:00:00 2001 From: yigitfindikli Date: Fri, 11 Mar 2022 12:51:19 +0300 Subject: [PATCH] Fixed #11298 and Fixed #11297 --- src/app/components/orderlist/orderlist.ts | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/src/app/components/orderlist/orderlist.ts b/src/app/components/orderlist/orderlist.ts index 22c76546299..61f143a61ab 100755 --- a/src/app/components/orderlist/orderlist.ts +++ b/src/app/components/orderlist/orderlist.ts @@ -13,10 +13,10 @@ import {CdkDragDrop, DragDropModule, moveItemInArray} from '@angular/cdk/drag-dr
- - - - + + + +
@@ -25,13 +25,13 @@ import {CdkDragDrop, DragDropModule, moveItemInArray} from '@angular/cdk/drag-dr
- +
    -
  • @@ -88,6 +88,8 @@ export class OrderList implements AfterViewChecked,AfterContentInit { @Input() stripedRows: boolean; + @Input() disabled: boolean = false; + @Output() selectionChange: EventEmitter = new EventEmitter(); @Input() trackBy: Function = (index: number, item: any) => item; @@ -110,7 +112,7 @@ export class OrderList implements AfterViewChecked,AfterContentInit { public emptyFilterMessageTemplate: TemplateRef; - _selection: any[]; + _selection: any[] = []; movedUp: boolean; @@ -439,6 +441,12 @@ export class OrderList implements AfterViewChecked,AfterContentInit { return null; } + moveDisabled(){ + if(this.disabled || !this.selection.length) { + return true; + } + } + createStyle() { if (!this.styleElement) { this.el.nativeElement.children[0].setAttribute(this.id, '');