Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: allow the autocompletion of a linked data value #3437

Merged
merged 3 commits into from
Jul 7, 2020

Conversation

janechu
Copy link
Collaborator

@janechu janechu commented Jul 2, 2020

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. If Enter 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:

[
    "Foo",
    "foo"
]

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:

[
    "foo-Bar",
    "foo",
]

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 then Tab is pressed, it will autocomplete to "foo-Bar" and the next enter is pressed it will add the linked data.

Issue type checklist

  • Chore: A change that does not impact distributed packages.
  • Bug fix: A change that fixes an issue, link to the issue above.
  • New feature: A change that adds functionality.

Is this a breaking change?

  • This change causes current functionality to break.

Adding or modifying component(s) in @microsoft/fast-components checklist

Process & policy checklist

  • I have added tests for my changes.
  • I have tested my changes.
  • I have updated the project documentation to reflect my changes.
  • I have read the CONTRIBUTING documentation and followed the standards for this project.

@janechu janechu self-assigned this Jul 2, 2020
@janechu janechu force-pushed the users/janechu/allow-autocomplete-of-linked-data branch from bc513e0 to 5e0171f Compare July 3, 2020 00:44
@janechu janechu force-pushed the users/janechu/allow-autocomplete-of-linked-data branch from 5e0171f to 99bd9cd Compare July 6, 2020 22:48
@janechu janechu merged commit dff0e5a into master Jul 7, 2020
@janechu janechu deleted the users/janechu/allow-autocomplete-of-linked-data branch July 7, 2020 01:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants