[dropdown] API-driven dropdowns do not display placeholder on first render #2837
Labels
tag/next-release/nightly
Any issue which has a corresponding PR which has been merged and is available in the nightly build
type/bug
Any issue which is a bug or PR which fixes a bug
Milestone
Bug Report
When a dropdown configued to fetch its contents from an API endpoint and the placeholder is specified in javascript rather than HTML then the initial placeholder is not present. For non-API endpoints the behavior is correct. Calling the 'clear' behavior on the dropdown or clicking the 'x' on a clearable dropdown restores the placeholder. A functional workaround is to call clear immediately after the dropdown is initialized.
Steps to reproduce
$('#xyz-dropdown').dropdown('clear')
Expected result
The placeholder is expected to appear on page load, as it does if the 'apiSettings' key is not present.
Actual result
The placeholder does not appear on page load.
Testcase
https://jsfiddle.net/ryf5b317/1/
Screenshot (if possible)
Version
2.9.2
The text was updated successfully, but these errors were encountered: