Skip to content

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

@github-actions
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

@github-actions
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
},
"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.

4 participants