feat: allow the autocompletion of a linked data value #3437
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This change allows the autocompletion on the input of the linked data control in the
<Form />
.Now, when
Tab
is pressed the value will autocomplete if there is a single matching item in the linked data list. IfEnter
is pressed the current value will be evaluated against lazily (lowercase values) or strictly (exact value) and if a single match can be found using either of these methods then the value will be added.An example of where this helps:
Example 1: The list of supplied linked data includes:
When
"foo"
is typed, it will match"Foo"
and"foo"
in the dropdown, however if enter is pressed then it will match"foo"
exactly and add this value.Example 2: the list of supplied linked data includes:
When
"foo-bar"
is typed it will match"foo-Bar"
lazily and when enter is pressed it will add the linked data.Likewise if
"foo-"
is typed and thenTab
is pressed, it will autocomplete to"foo-Bar"
and the next enter is pressed it will add the linked data.Issue type checklist
Is this a breaking change?
Adding or modifying component(s) in
@microsoft/fast-components
checklistProcess & policy checklist