Loading README.md +1 −1 Original line number Original line Diff line number Diff line Loading @@ -64,7 +64,7 @@ The following optional configuration items can be used. | dropUp | false | Show the menu above the cursor instead of below. | | dropUp | false | Show the menu above the cursor instead of below. | | maxItems | ∞ | Limit the number of items shown in the text. The default is no limit. | | maxItems | ∞ | Limit the number of items shown in the text. The default is no limit. | | mentionSelect | | An optional function to format the selected item before inserting the text. | | mentionSelect | | An optional function to format the selected item before inserting the text. | | allowSpaceWhileMentioning | false | An optional paremeter which decides whether to allow space while mentioning or not | | allowSpace | false | An optional paremeter which decides whether to allow space while mentioning or not | For Example: For Example: Loading projects/angular-mentions/README.md +1 −1 Original line number Original line Diff line number Diff line Loading @@ -64,7 +64,7 @@ The following optional configuration items can be used. | dropUp | false | Show the menu above the cursor instead of below. | | dropUp | false | Show the menu above the cursor instead of below. | | maxItems | ∞ | Limit the number of items shown in the text. The default is no limit. | | maxItems | ∞ | Limit the number of items shown in the text. The default is no limit. | | mentionSelect | | An optional function to format the selected item before inserting the text. | | mentionSelect | | An optional function to format the selected item before inserting the text. | | allowSpaceWhileMentioning | false | An optional paremeter which decides whether to allow space while mentioning or not | | allowSpace | false | An optional paremeter which decides whether to allow space while mentioning or not | For Example: For Example: Loading projects/angular-mentions/src/lib/mention-config.ts +1 −1 Original line number Original line Diff line number Diff line Loading @@ -29,7 +29,7 @@ export interface Mentions { dropUp?:boolean; dropUp?:boolean; // whether to allow space while mentioning or not // whether to allow space while mentioning or not allowSpaceWhileMentioning?: boolean; allowSpace?: boolean; // optional function to format the selected item before inserting the text // optional function to format the selected item before inserting the text mentionSelect?:(item: any) => (string); mentionSelect?:(item: any) => (string); Loading projects/angular-mentions/src/lib/mention.directive.ts +2 −2 Original line number Original line Diff line number Diff line Loading @@ -51,7 +51,7 @@ export class MentionDirective implements OnChanges { triggerChar: '@', triggerChar: '@', labelKey: 'label', labelKey: 'label', maxItems: -1, maxItems: -1, allowSpaceWhileMentioning: false, allowSpace: false, mentionSelect: (item: any) => this.activeConfig.triggerChar + item[this.activeConfig.labelKey] mentionSelect: (item: any) => this.activeConfig.triggerChar + item[this.activeConfig.labelKey] } } Loading Loading @@ -210,7 +210,7 @@ export class MentionDirective implements OnChanges { !event.ctrlKey && !event.ctrlKey && pos > this.startPos pos > this.startPos ) { ) { if (!this.activeConfig.allowSpaceWhileMentioning && event.keyCode === KEY_SPACE) { if (!this.activeConfig.allowSpace && event.keyCode === KEY_SPACE) { this.startPos = -1; this.startPos = -1; } } else if (event.keyCode === KEY_BACKSPACE && pos > 0) { else if (event.keyCode === KEY_BACKSPACE && pos > 0) { Loading Loading
README.md +1 −1 Original line number Original line Diff line number Diff line Loading @@ -64,7 +64,7 @@ The following optional configuration items can be used. | dropUp | false | Show the menu above the cursor instead of below. | | dropUp | false | Show the menu above the cursor instead of below. | | maxItems | ∞ | Limit the number of items shown in the text. The default is no limit. | | maxItems | ∞ | Limit the number of items shown in the text. The default is no limit. | | mentionSelect | | An optional function to format the selected item before inserting the text. | | mentionSelect | | An optional function to format the selected item before inserting the text. | | allowSpaceWhileMentioning | false | An optional paremeter which decides whether to allow space while mentioning or not | | allowSpace | false | An optional paremeter which decides whether to allow space while mentioning or not | For Example: For Example: Loading
projects/angular-mentions/README.md +1 −1 Original line number Original line Diff line number Diff line Loading @@ -64,7 +64,7 @@ The following optional configuration items can be used. | dropUp | false | Show the menu above the cursor instead of below. | | dropUp | false | Show the menu above the cursor instead of below. | | maxItems | ∞ | Limit the number of items shown in the text. The default is no limit. | | maxItems | ∞ | Limit the number of items shown in the text. The default is no limit. | | mentionSelect | | An optional function to format the selected item before inserting the text. | | mentionSelect | | An optional function to format the selected item before inserting the text. | | allowSpaceWhileMentioning | false | An optional paremeter which decides whether to allow space while mentioning or not | | allowSpace | false | An optional paremeter which decides whether to allow space while mentioning or not | For Example: For Example: Loading
projects/angular-mentions/src/lib/mention-config.ts +1 −1 Original line number Original line Diff line number Diff line Loading @@ -29,7 +29,7 @@ export interface Mentions { dropUp?:boolean; dropUp?:boolean; // whether to allow space while mentioning or not // whether to allow space while mentioning or not allowSpaceWhileMentioning?: boolean; allowSpace?: boolean; // optional function to format the selected item before inserting the text // optional function to format the selected item before inserting the text mentionSelect?:(item: any) => (string); mentionSelect?:(item: any) => (string); Loading
projects/angular-mentions/src/lib/mention.directive.ts +2 −2 Original line number Original line Diff line number Diff line Loading @@ -51,7 +51,7 @@ export class MentionDirective implements OnChanges { triggerChar: '@', triggerChar: '@', labelKey: 'label', labelKey: 'label', maxItems: -1, maxItems: -1, allowSpaceWhileMentioning: false, allowSpace: false, mentionSelect: (item: any) => this.activeConfig.triggerChar + item[this.activeConfig.labelKey] mentionSelect: (item: any) => this.activeConfig.triggerChar + item[this.activeConfig.labelKey] } } Loading Loading @@ -210,7 +210,7 @@ export class MentionDirective implements OnChanges { !event.ctrlKey && !event.ctrlKey && pos > this.startPos pos > this.startPos ) { ) { if (!this.activeConfig.allowSpaceWhileMentioning && event.keyCode === KEY_SPACE) { if (!this.activeConfig.allowSpace && event.keyCode === KEY_SPACE) { this.startPos = -1; this.startPos = -1; } } else if (event.keyCode === KEY_BACKSPACE && pos > 0) { else if (event.keyCode === KEY_BACKSPACE && pos > 0) { Loading