Skip to content

Separated Select options into their own Option and OptionGroup elements; Added -HelpText for Range, Checkbox, Radio, and Select elements; Added a new Datalist element#692

Merged
Badgerati merged 2 commits into
developfrom
Issue-602
Feb 5, 2026

Conversation

@Badgerati
Copy link
Copy Markdown
Owner

Description of the Change

This reworks how Selects and Options work - to enable support for the Datalist element, further control over Option attributes (like the missing Disabled), and also support for Option Grouping via <optgroup>. Also, the -HelpText parameter has been added to the Range, Checkbox, Radio, and Select elements - including Datalist.

For example, the following previous Select element:

New-PodeWebSelect -Name 'Example' -Options @('Option1', 'Option2') -SelectedValue 'Option1'

Would now be the following instead:

New-PodeWebSelect -Name 'Example' -Options @(
    New-PodeWebOption -Name 'Option1' -Selected
    New-PodeWebOption -Name 'Option2'
)

To assist with most migrations there is a helper function: ConvertTo-PodeWebOption. You can pipe an original raw string array into this, along with an optional -SelectedOption value, and it will convert to strings into Option elements for you:

New-PodeWebSelect -Name 'Example' -Options @(
    @('Option1', 'Option2') | ConvertTo-PodeWebOption -SelectedOption 'Option1'
)

The migration guide has been updated, including docs.

Related Issue

@Badgerati Badgerati added this to the 1.0.0 milestone Feb 5, 2026
@Badgerati Badgerati self-assigned this Feb 5, 2026
@Badgerati Badgerati added the enhancement ⬆️ New feature or request label Feb 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement ⬆️ New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

-HelpText for New-PodeWebSelect Combobox / Datalist / select

1 participant