-
-
Notifications
You must be signed in to change notification settings - Fork 119
added option for user to select the length of autocomplete #183
Conversation
Codecov Report
@@ Coverage Diff @@
## master #183 +/- ##
==========================================
- Coverage 33.26% 33.25% -<.01%
==========================================
Files 149 149
Lines 6294 6295 +1
Branches 1909 1910 +1
==========================================
Hits 2093 2093
- Misses 4193 4194 +1
Partials 8 8
Continue to review full report at Codecov.
|
@@ -160,8 +160,9 @@ export class AutoCompleteEditor implements Editor { | |||
|
|||
serializeValue() { | |||
// if user provided a custom structure, we will serialize the value returned from the object with custom structure | |||
const minLength = this.editorOptions.minLength || this.editorOptions.minLength === 0 ? this.editorOptions.minLength : 3; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
isn't it better to do?
const minLength = typeof this.editorOptions.minLength !== 'undefined' ? this.editorOptions.minLength : 3;
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yep, thanks
@loonix |
yep, tested before I send it through |
I see you added Uncyclo as well, thanks for that! |
no problem, happy to help! |
Hi there,
Just noticed that I missed something on this feature. It is a small change but it detects if the user has used the
minLength
and applies it to the field. For example if you want the user to be able to clear the input or be able to add a text with less than 3 characters.