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: add placeholder to FASTSelect #6853

Closed
brianchristopherbrady opened this issue Nov 1, 2023 · 1 comment
Closed

feat: add placeholder to FASTSelect #6853

brianchristopherbrady opened this issue Nov 1, 2023 · 1 comment
Labels
closed:obsolete No longer valid status:triage New Issue - needs triage

Comments

@brianchristopherbrady
Copy link

Add placeholder to FASTSelect

Add placeholder functionality to the FASTSelect component to align with how native HTML select elements handle placeholder text.

Expected Behavior

When a placeholder attribute is added to the FASTSelect component, it should dynamically render a hidden and disabled option element to display the placeholder text. If the placeholder attribute is undefined or empty, no placeholder option should be rendered.

Current Behavior

Currently, the FAST Select component does not provide a built-in way to display a placeholder when no items are selected specifically in multiple select mode. This feature would improve the user experience by providing a clear indication of the expected input or prompt the user to make a selection when multiple items can be chosen.

Possible Solution

Implement placeholder support by dynamically creating a hidden and disabled option element inside the FASTSelect component whenever a placeholder attribute is present and not empty. This option will contain the text passed to the placeholder attribute.

Context

The absence of placeholder functionality in FASTSelect limits its usability and alignment with native select features. Having this feature would improve the user experience by providing an indication of the kind of selection that should be made. This change won't alter current behavior if the placeholder attribute is not used but enhances functionality if it is used.

Example

image

@janechu
Copy link
Collaborator

janechu commented May 29, 2024

Unfortunately @microsoft/fast-foundation is being deprecated, refer to #6955. I see this was mentioned in a PR, we will be addressing open PRs and merging what we can before we snap an archive branch to preserve the latest state of Foundation, however to bring us up to date I am closing out issues.

@janechu janechu closed this as completed May 29, 2024
@janechu janechu added the closed:obsolete No longer valid label May 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closed:obsolete No longer valid status:triage New Issue - needs triage
Projects
None yet
Development

No branches or pull requests

2 participants