EasyUI Forum
April 17, 2024, 06:26:48 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Small bug with combobox id type  (Read 8091 times)
y.bykov
Newbie
*
Posts: 49


View Profile
« on: August 23, 2016, 01:07:15 PM »

EasyUI 1.5

When I want to select value in combobox I do
Code:
$('#vendor_id').combobox('setValues', vendor_id);
where vendor_id is integer, but I get error
Quote
jquery.easyui.min.js:13621 Uncaught TypeError: _a49.split is not a function
if(!$.isArray(_a49)){
_a49=_a49.split(opts.separator);
}
Integer doesn't have split function.
Logged
jarry
Administrator
Hero Member
*****
Posts: 2260


View Profile Email
« Reply #1 on: August 23, 2016, 03:48:34 PM »

The setValues method allows you to set multiple values, it requires an array as its parameter. Please call this code instead.
Code:
$('#vendor_id').combobox('setValues', [vendor_id]);
Logged
y.bykov
Newbie
*
Posts: 49


View Profile
« Reply #2 on: August 24, 2016, 07:58:50 AM »

Thank you!
Now, it works fine!
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!