Hi,
I have noticed when the autocomplete has a lot of options, the first time you click the input field the search doesn’t really work properly and i get suggestions which do not match what im typing. Also whatever i type does not show up in the input field.
I have solved this by adding a dummy option (“1”), which you can delete before you start typing and then it works 100%.
Sample of my code:
$serverlist = (invoke-restmethod https://s0apun0001g.cbsp.nl/api/Devices).Hostname
New-UDAutocomplete -Label "Servers to Snapshot" -Multiple -OnLoadOptions {
$serverlist | Where-Object { $_ -like "*$Body*" } | ConvertTo-Json
Is there a way to do this better/ differently so it works immediately?
The resulting set is about 1100 devices.
Product: PowerShell Universal
Version: 2.5.5