I tried using the findNodesByText to find a string contained in a node. To my great surprise it only search an exact match?
[I'm a node]
var nodes = this.treeIDMap.igTree( "findNodesByText", "I'm a" );// -> Found nothing
var nodes = this.treeIDMap.igTree( "findNodesByText", "I'm a node" );// -> Found the node
var nodes = this.treeIDMap.igTree( "findNodesByText", "node" );// -> Found nothing
Why would that be? So figuring this is only an exact match I'm trying to code a function to do what I need.
------------Here is one way to do it I guess ---------
var foundNodes = new Array(); filter = filter.toLowerCase(); findInObject = function( obj, prop, val )//go as deep as posible and find a match { if ( obj !== null && obj.hasOwnProperty( prop ) && obj[prop].toLowerCase().indexOf(val) > -1 ) { return obj; } else { for ( var s in obj ) { if ( obj.hasOwnProperty( s ) && typeof obj[s] == 'object' && obj[s] !== null ) { var result = findInObject( obj[s], prop, val ); if ( result !== null ) { return result; } } } } return null; } for ( var i = 0; i < this.treeData.length; i++ )//use the internal copy of the data to do the search and only modify the live { if ( findInObject( this.treeData[i], "ITEM", filter ) ) foundNodes.push( this.treeData[i] )//does the node have a match in it anywhere? } this.treeIDMap.igTree( { dataSource: foundNodes } ); this.treeIDMap.igTree( "dataBind" );
still would like it faster.
are updates not available to trial users?
Hello Seang,
The fix is going to be included in the upcoming service release. We will update you as soon as the service release is out including this fix.
To download the current service release for IgniteUI from our website, please follow these instructions:
1) Go to My Keys and Downloads page via the following link, you may be asked to log in using Infragistics member profile's user name and password:
https://es.infragistics.com/my-account/keys-and-downloads/
2) Click on the "NetAdvantage" tab. This will show all of your registered license keys for NetAdvantage.
3) Click on the license key for the product and version for which you would like to download a service release. This will bring up all available public downloads for this product and version.
4) In the "Service Releases" section, click on the link for the appropriate version of NetAdvantage.
If your license key is not listed on the My Keys and Downloads page in step 2, then your key has not been registered to your member profile. To register your license key, please go to the Product Registration page, via the following link:
<http://devcenter.infragistics.com/Protected/ProductRegistration.Aspx>
Once your license key is registered, it should appear in the My Keys and Downloads page, thus allowing you to download service releases for that version of NetAdvantage.
If you are unable to register your license key for some reason, such as that it is already registered to another user, please contact our Registrations department at the following email address: registrations@infragistics.com
please help me with the upgrade here, evidently I didnt do it right. where do I need to go to download the latest?
Hi again seang,
I have implemented the functionality in the igTree. The findNodesByText and findImmediateNodesByText methods now match nodes that contain the given strings, not only exact matches. The methods are still case sensitive, however if you would like to make them case insensitive you can modify the :contains jQuery selector to be case insensitive as described in this article: http://css-tricks.com/snippets/jquery/make-jquery-contains-case-insensitive/
Let me know if you have any questions.
I have logged this behavior in our internal tracking system with a Development ID of 142466 . The next step will be for a developer to review my investigation and confirm my findings or to offer a fix, or other resolution.
I will leave this case open and update you with any new information after the review. You can also continue to send updates to this case at any time.
You can view the status of the development issue connected to this case by going to the “My IG” tab on our website, hovering to the "My Support Activity" dropdown and selecting the "Development Issues" tab.
Please let me know if you need more information.