Skip to content

refactor: add enforce strict value for combobox #5572

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

Open
wants to merge 22 commits into
base: main
Choose a base branch
from
Open

Conversation

timarney
Copy link
Member

@timarney timarney commented May 22, 2025

Summary | Résumé

See: https://cds-snc.freshdesk.com/a/tickets/22779

Currently searchable list allows a user to input arbitrary text.

For example a list of colours

  • red
  • blue
  • yellow

If the user types ye and doesn't "select" a value from the list provided the input will capture ye and not yellow.

This update enforces that the user picks or types a full value from the list -- if they don't the typed value will clear.

See:

strict-value.mp4

Copy link
Contributor

@github-actions github-actions bot added the !! Package Update !! Please ensure packages are built and pushed label May 22, 2025
@timarney timarney changed the title refactor: Update downshift + add strict value select refactor: Update downshift + add enforce strict value for combobox May 22, 2025
@timarney
Copy link
Member Author

@dsamojlenko do you have an issue open for this ?

const { t } = useTranslation("form-builder");

// ⚠️ Early return if not combobox
if (item.type !== "combobox") {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could use the enum FormElementTypes.combobox

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@anikbrazeau
Copy link
Member

Related to #5010

Copy link
Contributor

@timarney timarney changed the title refactor: Update downshift + add enforce strict value for combobox refactor: add enforce strict value for combobox Jun 16, 2025
@@ -1415,6 +1415,11 @@
},
"en": "English",
"fr": "Français",
"strictValue": {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@anikbrazeau couple of missing strings here if you get a chance

@github-actions github-actions bot removed the !! Package Update !! Please ensure packages are built and pushed label Jul 8, 2025
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