From f674705cb48665d2515bee396f1f24469630a7cc Mon Sep 17 00:00:00 2001 From: yigitfindikli Date: Tue, 23 Oct 2018 15:18:25 +0300 Subject: [PATCH] fixed #5506 - readonly support for MultiSelect readonly added an readonly controls added in onMouseclick and onInputKeydown. --- src/app/components/multiselect/multiselect.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/app/components/multiselect/multiselect.ts b/src/app/components/multiselect/multiselect.ts index b656764718a..1ac09f87c0a 100644 --- a/src/app/components/multiselect/multiselect.ts +++ b/src/app/components/multiselect/multiselect.ts @@ -123,6 +123,8 @@ export class MultiSelect implements OnInit,AfterViewInit,AfterContentInit,AfterV @Input() inputId: string; @Input() disabled: boolean; + + @Input() readonly: boolean; @Input() filter: boolean = true; @@ -457,7 +459,7 @@ export class MultiSelect implements OnInit,AfterViewInit,AfterContentInit,AfterV } onMouseclick(event,input) { - if (this.disabled) { + if (this.disabled || this.readonly) { return; } @@ -486,6 +488,9 @@ export class MultiSelect implements OnInit,AfterViewInit,AfterContentInit,AfterV } onInputKeydown(event) { + if (this.readonly) { + return; + } switch(event.which) { //down case 40: