EasyUI Forum
May 03, 2024, 04:16:44 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: combotree can not select the checked item where multiple is false  (Read 6529 times)
yyjjssnn
Newbie
*
Posts: 2


View Profile Email
« on: May 24, 2016, 06:03:20 AM »

Code:
<input class="easyui-combotree" data-options="url:'tree_data1.json',method:'get',required:true, multiple:false" style="width:200px;">

Code:
[{
"id":1,
"text":"My Documents",
"state":"open",
"children":[{
"id":11,
"text":"Photos",
"state":"open",
"children":[{
"id":111,
"text":"Friend",
"checked":true
},{
"id":112,
"text":"Wife"
},{
"id":113,
"text":"Company"
}]
}]
}]
Logged
jarry
Administrator
Hero Member
*****
Posts: 2262


View Profile Email
« Reply #1 on: May 24, 2016, 06:53:21 AM »

The checked property is designed for multiple selections. When you set the multiple to false, the checked property is ignored. If you want to initialize the combotree value, please set the value property for the combotree component.
Logged
yyjjssnn
Newbie
*
Posts: 2


View Profile Email
« Reply #2 on: May 24, 2016, 07:22:39 PM »

The checked property is designed for multiple selections. When you set the multiple to false, the checked property is ignored. If you want to initialize the combotree value, please set the value property for the combotree component.

but which item need to be selected is returned with the json data.

my solution is find the selected item in the onLoadSuccess event
then setValue.
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!