Activity Forums Salesforce Discussions How do I get the value of the selected value in LWC Combobox?

  • How do I get the value of the selected value in LWC Combobox?

  • Shweta

    Member
    January 5, 2021 at 6:11 pm

    How do I get the value of the selected value in LWC Combobox?

  • Aditya

    Member
    February 23, 2021 at 7:11 am

    `@track selectedLabel;

    get options() {
    return [
    { label: 'New', value: 'new' },
    { label: 'In Progress', value: 'inProgress' },
    { label: 'Finished', value: 'finished' },
    ];
    }

    handleChange(event) {
    this.selectedLabel = event.target.options.find(opt => opt.value === event.detail.value).label;
    }`

Viewing 1 - 2 of 2 posts

Log In to reply.




Popular Salesforce Blogs

Popular Salesforce Videos