I love this component, itās perfect for what I need. This is probably a question for @psDevUK - Do you know why the select box is focused on by default when a page is loaded with the selector? Hereās an example of one of my pages using it:
I tried forcing the focus to the company name dropdown using Select-UDElement but that doesnāt seem to work for select boxes so the focus stays on the selector.
Hey @tom.obrien thanks for showing the appreciation for this component. In the forms that I am using this component in, I have made it the first component in the list, so not come across this problemā¦I am sure there is a solution to this problemā¦I will knock up some demo form and do my best to make this work. Peace
Hey @tom.obrien I havent forgot about your issue, but not got round to building anything dashboard related in the past few weeksā¦however I have looked into this, and I believe this is happening as the JSX file which was used to create this component, I have included the autoFocus which is doing itās job and auto focusing the componentā¦so to fix this I will need to rebuild the component, then re-publish this back to the powershell gallery which in-turn will sync to the marketplace, I will update once I have done this. Thanks
Trust @tom.obrien my life is never dull, with four young daughters to entertain and full time job etc. So put a bit of time to one-side today to rebuild both the multi selection and single selection selector components. I have not published these to the powershell gallery yet, but I have stuck them both on GITHUB here:- https://github.com/psDevUK/UD-Selector/tree/master/No_AutoFocus I have not tested yet, but literally removed the word autoFocus on both cases, and rebuilt it in the same fashion. Hopefully this should now tick all the boxes for you
I got sidetracked with some other work but I can confirm that it now works as expected and it now doesnāt focus on the select box. Iāve already integrated it in multiple places in my app now and Iāll be using the single select too in place of the udselect so itās nice and consistent. Thanks again @psDevUK
@psDevUK
Hi Adam!
Im having issues on this module. I want to populate the options from a Get-ADGroup query. Iāve tried different methods but those always trew me the " One or more errors occurred
You cannot call a method on a null-valued expression." New-UDRow -Columns { New-UDColumn -size 5 -Content { New-UDTypography -Text "ARG" $arrayArgDistrolist = @() $grupo = get-adobject -Filter 'ObjectClass -eq "group"' -SearchBase "OU=Argentina,OU=Distribution Groups,OU=company,DC=company,DC=local" | Select-Object Name,DistinguishedName foreach ($grupos in $grupo) { $grupoArgDN= $grupos.DistinguishedName $grupoArgName = $grupos.Name $arrayArgDistrolist += @{ value ="ā$grupoArgDN"" label ="ā$grupoArgName""} } New-UDSelector -id "selectorARG" -Options {$arrayArgDistrolist} -Placeholder "Select Arg Groups" } }
Hello @fd1911 thanks for taking the time to try out this moduleā¦Apologies on late reply just been super busy trying to decorate the houseā¦and Iām better at coding than DIY for sureā¦I been laying flooring for about 10 hours, but I will cook you up something tomorrow, to show this working reading Active Directory
Ok 34 minutes later after laying flooring all day, and cutting boards, I needed something else to zone into so here is a complete working dashboard example
I appreciate this is a super late reply but I had the same error and found it was a new param in the latest version ā-Selectedā that needs to be added to the command, even if itās an empty script block. For example:
Sorry if this has already been mentioned here, I tried searching but didnāt find anything. Is there a way to fix this when using the single selector component on UDv3 Dark theme?
Using using the light theme, the dropdown text looks as it supposed to, but with the dark theme the text in the dropdown turns white so you canāt see the text in the dropdown (only one you can see is the currently highlighted one due to the background color changing slightly.)
Hello @RamonMA when I initially built this component Powershell Universal didnāt exist I believe, as I built this for UDā¦I have now got myself using Powershell Universal. This problem was mentioned before to me I believe but I was not using Powershell Universal at the time.
So now you jogged my memory I will have a butchers at fixing this theming issue. It will most likely require rebuilding this, so let me look into this and will update once Iāve had a proper butchers at this. Thanks
No, thank you @psDevUK. I too am migrating my dashboards to PSU from UD2.9. It would be nice if the New-UDAutoComplete and New-UDSelect were kinda merged together in PSU. I like using auto complete, but I need there to be a key value pair for each of the option, like select has.