Loading src/mention/mention-config.ts +4 −0 Original line number Original line Diff line number Diff line Loading @@ -21,6 +21,10 @@ export interface Mentions { // option to disable sorting // option to disable sorting disableSort?:boolean; disableSort?:boolean; // option to diable internal filtering. can be used to show the full list returned // from an async operation (or allows a custom filter function to be used - in future) disableSearch?:boolean; // display menu above text instead of below // display menu above text instead of below dropUp?:boolean; dropUp?:boolean; Loading src/mention/mention.directive.ts +1 −5 Original line number Original line Diff line number Diff line Loading @@ -59,10 +59,6 @@ export class MentionDirective implements OnChanges { // event emitted whenever the search term changes // event emitted whenever the search term changes @Output() searchTerm = new EventEmitter(); @Output() searchTerm = new EventEmitter(); // option to diable internal filtering. can be used to show the full list returned // from an async operation (or allows a custom filter function to be used - in future) private disableSearch:boolean = false; private triggerChars:{[key:string]:MentionConfig} = {}; private triggerChars:{[key:string]:MentionConfig} = {}; private searchString: string; private searchString: string; Loading Loading @@ -279,7 +275,7 @@ export class MentionDirective implements OnChanges { if (this.activeConfig && this.activeConfig.items) { if (this.activeConfig && this.activeConfig.items) { let objects = this.activeConfig.items; let objects = this.activeConfig.items; // disabling the search relies on the async operation to do the filtering // disabling the search relies on the async operation to do the filtering if (!this.disableSearch && this.searchString) { if (!this.activeConfig.disableSearch && this.searchString) { let searchStringLowerCase = this.searchString.toLowerCase(); let searchStringLowerCase = this.searchString.toLowerCase(); objects = objects.filter(e => e[this.activeConfig.labelKey].toLowerCase().startsWith(searchStringLowerCase)); objects = objects.filter(e => e[this.activeConfig.labelKey].toLowerCase().startsWith(searchStringLowerCase)); } } Loading Loading
src/mention/mention-config.ts +4 −0 Original line number Original line Diff line number Diff line Loading @@ -21,6 +21,10 @@ export interface Mentions { // option to disable sorting // option to disable sorting disableSort?:boolean; disableSort?:boolean; // option to diable internal filtering. can be used to show the full list returned // from an async operation (or allows a custom filter function to be used - in future) disableSearch?:boolean; // display menu above text instead of below // display menu above text instead of below dropUp?:boolean; dropUp?:boolean; Loading
src/mention/mention.directive.ts +1 −5 Original line number Original line Diff line number Diff line Loading @@ -59,10 +59,6 @@ export class MentionDirective implements OnChanges { // event emitted whenever the search term changes // event emitted whenever the search term changes @Output() searchTerm = new EventEmitter(); @Output() searchTerm = new EventEmitter(); // option to diable internal filtering. can be used to show the full list returned // from an async operation (or allows a custom filter function to be used - in future) private disableSearch:boolean = false; private triggerChars:{[key:string]:MentionConfig} = {}; private triggerChars:{[key:string]:MentionConfig} = {}; private searchString: string; private searchString: string; Loading Loading @@ -279,7 +275,7 @@ export class MentionDirective implements OnChanges { if (this.activeConfig && this.activeConfig.items) { if (this.activeConfig && this.activeConfig.items) { let objects = this.activeConfig.items; let objects = this.activeConfig.items; // disabling the search relies on the async operation to do the filtering // disabling the search relies on the async operation to do the filtering if (!this.disableSearch && this.searchString) { if (!this.activeConfig.disableSearch && this.searchString) { let searchStringLowerCase = this.searchString.toLowerCase(); let searchStringLowerCase = this.searchString.toLowerCase(); objects = objects.filter(e => e[this.activeConfig.labelKey].toLowerCase().startsWith(searchStringLowerCase)); objects = objects.filter(e => e[this.activeConfig.labelKey].toLowerCase().startsWith(searchStringLowerCase)); } } Loading