Skip to content

Commit

Permalink
Merge pull request #6735 from yigitfindikli/multiselectreadonly
Browse files Browse the repository at this point in the history
fixed #5506 - readonly support for MultiSelect
  • Loading branch information
cagataycivici authored Oct 24, 2018
2 parents b48761f + f674705 commit 41d9bef
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/app/components/multiselect/multiselect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -457,7 +459,7 @@ export class MultiSelect implements OnInit,AfterViewInit,AfterContentInit,AfterV
}

onMouseclick(event,input) {
if (this.disabled) {
if (this.disabled || this.readonly) {
return;
}

Expand Down Expand Up @@ -486,6 +488,9 @@ export class MultiSelect implements OnInit,AfterViewInit,AfterContentInit,AfterV
}

onInputKeydown(event) {
if (this.readonly) {
return;
}
switch(event.which) {
//down
case 40:
Expand Down

0 comments on commit 41d9bef

Please sign in to comment.