Cannot set default value for Material select

MDB SupportCategory: MDB AngularCannot set default value for Material select
Paperfree Pro User asked 6 months ago in MDB pro, version:5.1.2

Hello!

I am using material-select component with MDB Angular Pro.

I can’t set default selected option.

Please, help. The code below doesn’t work.

        this.optionsSelect = [
            { value: '1', label: 'Option 1' },
            { value: '2', label: 'Option 2' },
            { value: '3', label: 'Option 3', selected: true },
        ];

Thank you!

1 Answers
Damian Gemza answered 6 months ago

Hello Paperfree,

Please read this topic. There’s everything described: https://mdbootstrap.com/support/default-value-select-angular/

Best Regards,

Damian

Paperfree Pro User replied 6 months ago

Thank you. It is working!