Skip to main content

I'm developing a LWC Combobox and iI want to get the label of the selected value in the handleChangehandleChange() method, not the idid. I filled the combobox with JSON Items in this form : {value :'Id', label:'Label'}.

{value :'Id', label:'Label'}

iI used this in JS : event.detail.value but it gives the id not the Label.

I'm developing a LWC Combobox and i want to get the label of the selected value in the handleChange method, not the id. I filled the combobox with JSON Items in this form : {value :'Id', label:'Label'}.

i used this in JS : event.detail.value but it gives the id not the Label

I'm developing a LWC Combobox and I want to get the label of the selected value in the handleChange() method, not the id. I filled the combobox with JSON Items in this form :

{value :'Id', label:'Label'}

I used this in JS : event.detail.value but it gives the id not the Label.

Source Link

How i can get the label of the selected value in Combobox - Lightning Web Components?

I'm developing a LWC Combobox and i want to get the label of the selected value in the handleChange method, not the id. I filled the combobox with JSON Items in this form : {value :'Id', label:'Label'}.

i used this in JS : event.detail.value but it gives the id not the Label