File tree 2 files changed +8
-4
lines changed
2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change 1
1
## Upcoming
2
2
3
3
* Fixed ` FieldView ` focus getting lost on clicking the ` OptionsView ` on non-mobile platforms.
4
- * Fixed ` RangeError ` when ` textEditingValue.selection.isInvalid ` . [ #11 ] ( https://github.com/xsahil03x/multi_trigger_autocomplete/issues/11 )
4
+ * Fixed ` RangeError ` when ` textEditingValue.selection.isInvalid ` .
5
+ [ #11 ] ( https://github.com/xsahil03x/multi_trigger_autocomplete/issues/11 )
6
+ * Fixed ` AutocompleteTrigger ` not getting triggered when the text is a multi-line
7
+ string. [ #12 ] ( https://github.com/xsahil03x/multi_trigger_autocomplete/issues/12 )
5
8
6
9
## 0.1.1
7
10
Original file line number Diff line number Diff line change @@ -81,13 +81,14 @@ class AutocompleteTrigger {
81
81
return null ;
82
82
}
83
83
84
- // Only show typing suggestions after a space, or at the start of the input
85
- // valid examples: "@user", "Hello @user"
84
+ // Only show typing suggestions after a space, new line or at the start of the input.
85
+ // valid examples: "@user", "Hello @user", "Hello\n@user"
86
86
// invalid examples: "Hello@user"
87
87
final textBeforeTrigger = text.substring (0 , firstTriggerIndexBeforeCursor);
88
88
if (triggerOnlyAfterSpace &&
89
89
textBeforeTrigger.isNotEmpty &&
90
- ! textBeforeTrigger.endsWith (' ' )) {
90
+ ! (textBeforeTrigger.endsWith (' ' ) ||
91
+ textBeforeTrigger.endsWith ('\n ' ))) {
91
92
return null ;
92
93
}
93
94
You can’t perform that action at this time.
0 commit comments