Search In This Blog

2022-08-29

The selected number not displayed in the "lightning-combobox"?

The value of your options is a number, while event.detail.value holds a string.

After selecting an option, this. currentValue will hold a wrong value, i.e. '2022' instead of 2022.

convert to number: 
handleChange (event) {
    this.currentValue = +event.detail.value;
}