Combobox Server Filtering on select of item, the Text and Value is undefined

0 Answers 129 Views
ComboBox
Zhuo
Top achievements
Rank 1
Zhuo asked on 21 Dec 2022, 12:34 AM

I want to get the value and create a link to redirect to based on the selected result.

But getting undefined.

 function onSelect(e) {

            if (e.item) {
                var dataItem = this.dataItem(e.item.index());
                console.log("event :: select ( index***" + e.item.index + "***: " + dataItem.Text + " : " + dataItem.Value + ")");
            } else {
                console.log("event :: select");
            }
    }


 

    
Zhuo
Top achievements
Rank 1
commented on 21 Dec 2022, 06:25 PM

I resolved the issue by inspecting e in the debugger.

e.dataItem got the information I needed.

No answers yet. Maybe you can help?

Tags
ComboBox
Asked by
Zhuo
Top achievements
Rank 1
Share this question
or