fluentui icon indicating copy to clipboard operation
fluentui copied to clipboard

Combo-box placeholder not displaying

Open joshburnssp opened this issue 7 years ago • 6 comments

Describe the issue:

Using a combo-box and want to set a placeholder within the dropdown box, seen the code on the Fabric UI site. When setting the placeholder property, it doesn't display anything. I have tried setting the placeholder in the code and also via properties and in the property pane

Actual behavior:

<ComboBox allowFreeform autoComplete="on" placeholder="Select an office" onChanged={this.changeState} options={this.state.OfficelistData} ></ComboBox>

image

image

Expected behavior:

https://developer.microsoft.com/en-us/fabric#/components/ComboBox

Want to get the ComboBox with placeholder text

image

joshburnssp avatar Mar 04 '19 15:03 joshburnssp

@joshburnssp Is this behavior you are expecting to see? image

Here is a codepen https://codepen.io/aftab-hassan/pen/Mxjjvj

Please confirm and we'll take it from there.

aftab-hassan avatar Mar 04 '19 19:03 aftab-hassan

That is what i am expecting to see.

I am seeing nothing though :(

joshburnssp avatar Mar 05 '19 08:03 joshburnssp

That is what i am expecting to see.

I am seeing nothing though :(

@joshburnssp Could you please take a look at this codepen which sets a placeholder. https://codepen.io/aftab-hassan/pen/Mxjjvj

If the scenario that does not work for you is different, would you be able to provide us a codepen that captures the issue? That would help us understand better and get back. Look forward to helping fix this.

aftab-hassan avatar Mar 06 '19 07:03 aftab-hassan

Here is a codepen, can't get it too work on there either...

am i doing something wrong?

joshburnssp avatar Mar 06 '19 09:03 joshburnssp

@joshburnssp

Looks like React was not defined in your codepen. By adding React to your codepen, I am able to get the place holder text, and the options you expect to see.

Please take a look at this updated codepen (code is same as the one you shared, with React added)

https://codepen.io/aftab-hassan/pen/pYdLJG

combobox-placeholder

aftab-hassan avatar Mar 13 '19 00:03 aftab-hassan

This issue has been automatically marked as stale because it has marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment. Thank you for your contributions to Fabric React!

msft-github-bot avatar Mar 17 '19 01:03 msft-github-bot