ng-dynamic-forms
ng-dynamic-forms copied to clipboard
DynamicSelectModel dropdown placeholder not displaying
Hi,
According to the this documentation I should be able to create a DynamicDelectModel and assign a placeholder value.
new DynamicSelectModel<string>({
id: "mySelect",
options: [
{
label: "Option 1",
value: "option-1",
},
{
label: "Option 2",
value: "option-2"
},
{
label: "Option 3",
value: "option-3"
}
],
placeholder: "Please select an option"
})
However I'm having trouble displaying that placeholder. I just keep getting an empty select. There are values if you click the dropdown, but the initial form element is empty on start (instead of showing the placeholder).
Am I missing something?
Thanks!
@alzdrak Hi!
Am I missing something?
It depends on which UI package you're using.
placeholder is ignored by all UI templates that use native HTML select.
You'd have to use Material, for example, to make it work.