Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Power Apps Pro Dev & ISV
Unanswered

PCF: Which way is supported to implement an optionset/autocomplete PCF control?

(0) ShareShare
ReportReport
Posted on by 3,072 Most Valuable Professional

A PCF Control for an optionset/autocomplete control is a special kind of control, because the content is rendered outside the HTML container.

As far as I understand, there are a few ways to implement it:

1. An HTML "select" element from scratch, is case that's enough for the requirement

2. Using Office-ui-fabric-react Combobox or DropDown

3. Using another react control (like react-autosuggest)

4. Using an HTML "input" element and showing the options using the component-framework PopupService

... maybe there are more options?

And here are the problems:

  • Solution (1.) "select" doesn't fit to my requirement.
  • Solution (2.)  office-ui-fabric-react works ( however I have some problems to style some parts).
  • Using (3.) react-autosuggest the options are not visible, because they are rendered under the other controls on the form (they don't get outside the container, where they are rendered). The only solution with that would be to work with z-index, but is it a best practice to work that way? Maybe later on, some other form elements get a bigger z-index, and will be visible through my control. Which make me think, that maybe the solution 2. (office ui fabric) is also not safe; maybe is working by hazard right now.
  • Solution (4.) PopupService seems to me kind of overengineered, and makes it hard to use 3rd Party controls; would mean to implement everything from scratch.

Can you please tell me which approach(es) are supported?

Best regards,

Diana

  • Diana Birkelbach Profile Picture
    3,072 Most Valuable Professional on at
    Re: PCF: Which way is supported to implement an optionset/autocomplete PCF control?

    Thank you for the answer.

    But the other controls could use z-Index even if they don't have the focus. 

    For instance in the (now deprecated) Refreshed UI, the red "Required" symbols for controls had some high zIndex and you could see them even through IFrames above that. That's why I'm worrying, and I'm asking about best practices.

     

  • Ben Thompson Profile Picture
    1,400 on at
    Re: PCF: Which way is supported to implement an optionset/autocomplete PCF control?

    I can't see how z-index would be an issue.

    The times you are likely to use z-index within a control is when that control is in focus so unless something disastrous is occurring only 1 control should be using it at a time.  So I really wouldn't worry about how other people use it, you just need to ensure your popup is above the rest of your control.

  • a33ik Profile Picture
    3,304 Most Valuable Professional on at
    Re: PCF: Which way is supported to implement an optionset/autocomplete PCF control?

    To be honest, I haven't touched z-index at all. Office UI Fabric did all the work for me and I have no issues with rendering of options or the whole control.

  • Diana Birkelbach Profile Picture
    3,072 Most Valuable Professional on at
    Re: PCF: Which way is supported to implement an optionset/autocomplete PCF control?

    Thank you. I'll try again to make an Autocomplete Control using the OfficeUiFabric. 

    An important information from your answer is that I don't need the PopupService  to show the options, and that even if I use OfficeUIFabric or another React 3rd Party Control, if I get them to work (like setting zIndex) I don't risk that the options will be hidden under by some other PCF Controls on the form having a higher z-Index.

    Have I understood right?

  • a33ik Profile Picture
    3,304 Most Valuable Professional on at
    Re: PCF: Which way is supported to implement an optionset/autocomplete PCF control?

    Diana,

    I believe every approach you mentioned is supported. I have already implemented autocomplete and I would highly recommend to look at Office UI Fabric. Unfortunately it doesn't have the native autocomplete control but I used following as a basis for my autocomplete - https://github.com/somsharp/UIFabricAutoComplete

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 791 Most Valuable Professional

#2
MS.Ragavendar Profile Picture

MS.Ragavendar 410

#3
mmbr1606 Profile Picture

mmbr1606 275 Super User 2025 Season 1