Autocomplete
Autocomplete component for Universal Dashboard
The autocomplete is a normal text input enhanced by a panel of suggested options.

Autocomplete with a static list of options

1
New-UDAutocomplete -Options @('Test', 'Test2', 'Test3', 'Test4')
Copied!

Autocomplete with a dynamic list of options

1
New-UDAutocomplete -OnLoadOptions {
2
@('Test', 'Test2', 'Test3', 'Test4') | Where-Object { $_ -match $Body } | ConvertTo-Json
3
}
Copied!

Autocomplete with an OnChange script block

1
New-UDAutocomplete -OnLoadOptions {
2
@('Test', 'Test2', 'Test3', 'Test4') | Where-Object { $_ -match $Body } | ConvertTo-Json
3
} -OnChange {
4
Show-UDToast $Body
5
}
Copied!
Last modified 6mo ago