ng-dynamic-forms icon indicating copy to clipboard operation
ng-dynamic-forms copied to clipboard

DynamicSelectModel dropdown placeholder not displaying

Open nikoszs opened this issue 9 years ago • 1 comments

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!

nikoszs avatar Aug 22 '17 09:08 nikoszs

@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.

udos86 avatar Aug 23 '17 19:08 udos86