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

New-UDSelect '-DefaultValue' doesn't display the value as the selected value on load #4169

Open
bt-ndollimount opened this issue Dec 20, 2024 · 1 comment
Labels
bug Something isn't working PowerShell Universal Issue relates to PowerShell Universal. requires triage Issue has not yet been verified by the development team. v5 Version 5 issue.

Comments

@bt-ndollimount
Copy link

bt-ndollimount commented Dec 20, 2024

Description of Issue

When creating a New-UDSelect and setting the -DefaultValue parameter, the value is selected in the dropdown but it's not display when the page is loaded; it's display blank.

In the example in my screen shots, I have the -DefaultValue set to 7.

Version

5.1.12

Severity

Low

Hosting Method

Other

Operating System

Linux

Database

PostgreSQL

Licensed

Yes

Features

Git Sync

Additional Environment data

Amazon Linux
PowerShell 7.4.6
PostgreSQL 16

Screenshots/Animations

image
image

@bt-ndollimount bt-ndollimount added bug Something isn't working PowerShell Universal Issue relates to PowerShell Universal. requires triage Issue has not yet been verified by the development team. v5 Version 5 issue. labels Dec 20, 2024
@bt-ndollimount
Copy link
Author

Further testing with this, it only seems to be an issue with integer values. In my loop to create the dropdown options, I added .toString() at the end of the variable and then put the default value in single quotes and that seems to work for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working PowerShell Universal Issue relates to PowerShell Universal. requires triage Issue has not yet been verified by the development team. v5 Version 5 issue.
Projects
None yet
Development

No branches or pull requests

1 participant