EasyUI Forum
May 05, 2024, 06:59:39 AM *
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 - problem with new version  (Read 12057 times)
A-K
Full Member
***
Posts: 122


View Profile WWW
« on: August 29, 2014, 08:31:58 AM »

Hey, I have combotree that when pressed on any of the items in the tree it will show the hierarchy with '/'
as shown in the first image called 'working combotree'. Everything worked great before the 1.4 version.

Since the new version I have problems when expanding nodes with lazy loading, When pressed on the expand button,
the text of the combotree immediately return the text to be the original text of the selected node.

 Example:
If I selected 'intel' and his parent is 'Program Files' and his parent is 'My Documents' then the text will be 'My Documents / Program Files / intel'
but when pressed on the expand button of a node with lazy loading it will return to be 'intel' as shown in image called 'problem combotree'.

I am changing the text of the combobox in the onSelect event of the tree.

Please any help with this problem.

Thanks.
Logged
jarry
Administrator
Hero Member
*****
Posts: 2262


View Profile Email
« Reply #1 on: August 29, 2014, 10:51:57 AM »

When click a tree node, only the text value is retrieved and displayed on the input box. No any '/' characters are added.
Logged
A-K
Full Member
***
Posts: 122


View Profile WWW
« Reply #2 on: August 29, 2014, 10:56:47 AM »

I am sorry I didnt understand your answer.

In the pictures I provided I show how I change the text as I need it to be but when expanding a node with lazy loading
your combotree change the text for some reason.

My problem is that when expanding a node(with lazy loading) in the tree, the text in the combo is changing but
I didnt select a new node or did anything to make the text change.
I dont want the text in the combo to change because I am changing him in the onSelect event.

What can I do to not make the combo change the text or to make it show the text I want to when expanding a node(with lazy loading)?
« Last Edit: August 29, 2014, 11:00:25 AM by A-K » Logged
jarry
Administrator
Hero Member
*****
Posts: 2262


View Profile Email
« Reply #3 on: August 29, 2014, 11:36:40 AM »

Please visit this example http://jsfiddle.net/ydy2wutq/1/.
When expanding a tree node, the 'onSelect' event does not triggered.
« Last Edit: August 29, 2014, 11:38:31 AM by jarry » Logged
A-K
Full Member
***
Posts: 122


View Profile WWW
« Reply #4 on: August 30, 2014, 03:25:35 AM »

Thank you for trying to help, But I know that onSelect is not called
on the expand event. My question is why does the text in the combotree
change when expanding a node?

I will upload 2 more images to try to show my problem.

In the first image you can see I have changed in the onSelect event the text of the combotree
In the second image I have expanded a node with lazy loading and the text has changed.
Why is it changing in the expand event? How can I make it not to change?

Logged
jarry
Administrator
Hero Member
*****
Posts: 2262


View Profile Email
« Reply #5 on: August 30, 2014, 05:13:47 PM »

Your 'onSelect' event handler code may have some mistakes. Please see this updated example http://jsfiddle.net/ydy2wutq/2/.
Logged
A-K
Full Member
***
Posts: 122


View Profile WWW
« Reply #6 on: August 31, 2014, 06:56:03 AM »

Thank you! works great!
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!