EasyUI
Home
Demo
Tutorial
Documentation
Download
Extension
Contact
Forum
EasyUI Forum
May 20, 2024, 03:30:46 PM
Welcome,
Guest
. Please
login
or
register
.
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News
:
Home
Help
Search
Login
Register
EasyUI Forum
>
General Category
>
Bug Report
>
Unselect combobox throw error
Pages: [
1
]
« previous
next »
Print
Author
Topic: Unselect combobox throw error (Read 7169 times)
arma
Full Member
Posts: 110
Unselect combobox throw error
«
on:
July 23, 2014, 02:52:33 AM »
Hi,
When i unselect a combo, it throws error "TypeError: Cannot read property 'length' of undefined".
For example i have a combo with value 1 selected and then i run in console $('#mycombo').combobox('unselect',1);
Is it a bug or i call the method in a wrong way?
Note: i have attached onChange event in the combobox.
Thanks
Logged
arma
Full Member
Posts: 110
Re: Unselect combobox throw error
«
Reply #1 on:
July 23, 2014, 02:56:49 AM »
Ah oke i got it,
when method unselect called, it will trigger onchange which will return newVal parameter as undefined. Solved now.
Code:
onChange: function(newVal, oldVal) {
if(newVal === undefined){
return false;
}
.....
Logged
Pages: [
1
]
Print
« previous
next »
Jump to:
Please select a destination:
-----------------------------
General Category
-----------------------------
=> News
=> General Discussion
=> EasyUI for jQuery
=> EasyUI for Angular
=> EasyUI for Vue
=> EasyUI for React
=> Bug Report
Loading...