Commit 3eb39f50 authored by Przemyslaw Gedzba's avatar Przemyslaw Gedzba
Browse files

Change config name

parent 047fb92c
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -64,7 +64,7 @@ The following optional configuration items can be used.
| 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. |
| 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: 

+1 −1
Original line number Diff line number Diff line
@@ -64,7 +64,7 @@ The following optional configuration items can be used.
| 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. |
| 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: 

+1 −1
Original line number Diff line number Diff line
@@ -29,7 +29,7 @@ export interface Mentions {
  dropUp?:boolean;

  // whether to allow space while mentioning or not
  allowSpaceWhileMentioning?: boolean;
  allowSpace?: boolean;

  // optional function to format the selected item before inserting the text
  mentionSelect?:(item: any) => (string);
+2 −2
Original line number Diff line number Diff line
@@ -51,7 +51,7 @@ export class MentionDirective implements OnChanges {
    triggerChar: '@',
    labelKey: 'label',
    maxItems: -1,
    allowSpaceWhileMentioning: false,
    allowSpace: false,
    mentionSelect: (item: any) => this.activeConfig.triggerChar + item[this.activeConfig.labelKey]
  }

@@ -210,7 +210,7 @@ export class MentionDirective implements OnChanges {
          !event.ctrlKey &&
          pos > this.startPos
      ) {
        if (!this.activeConfig.allowSpaceWhileMentioning && event.keyCode === KEY_SPACE) {
        if (!this.activeConfig.allowSpace && event.keyCode === KEY_SPACE) {
          this.startPos = -1;
        }
        else if (event.keyCode === KEY_BACKSPACE && pos > 0) {