Posted 20 January 2021, 10:43 pm EST
Hi Nivisha,
You may handle the selectedIndexChanged event and update the value of the text field with the currently selected value. Please refer to the following code snippet and the sample demonstrating the same:
var lb = new wjInput.ListBox(listHost, {
itemsSource: getCoutries(),
selectedIndexChanged: (s, e) => {
displayListBoxValueInTextField(s);
}
});
// initial display
displayListBoxValueInTextField(lb);
function displayListBoxValueInTextField(listBox) {
let tb = document.getElementById("inp");
tb.value = listBox.selectedValue;
}
https://codesandbox.io/s/wijmo-starter-forked-po59j?file=/src/index.js
Regards
Sharad