Activity Forums Salesforce® Discussions 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;
    }`

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos