-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using sort: 'text' doesn't retain proper order #13
Comments
Well that's frustrating, I might've put my foot in my mouth. I made this fiddle, which contradicts the issue I've filed. The only difference I have between my issue and the fiddle is that I'm using a custom Angular renderer. Thoughts? PS: Sorry the fiddle is ugly, I don't know a better way to include libraries that aren't available over a CDN. |
Alright, I was able to recreate it in this fiddle using my test data. Apparently If you expand all nodes and move down the tree with the down arrow, you get stuck on |
Both "broken" and "working" examples fail for me, but I see why these aren't working. I can have a fix tomorrow morning. |
I have a fix for this in place. Just need to write some tests tomorrow. Also, I've requested that inspire-tree be included in the cdnjs.com library. That way you have a cdn url to the files you can link to in jsbin/fiddle demos. |
Yeah I didn't name those properly. Both were broken, I just wanted to ensure data that wasn't in the proper order was the root cause. |
I have the same issue with 1.10.3 if I add elements after tree is initialized Example: https://jsfiddle.net/3v5wL01u/1/ |
While the title may not make sense, I hope that the details here make it crystal clear.
When creating a tree with
sort: 'text'
applied to the configuration and supplyingdata
in an array that is out of order, keyboard navigation (more specificallynextVisibleNode
,previousVisibleNode
, etc) fails to return the propernode
.Consider this configuration:
Then
tree.nodes()[1]
would give me nodeB
, however callingtree.nodes()[1].nextVisibleNode()
would give meundefined
since it was last in the originaldata
array. I would expect that to give meC
since it's visually the next one.I can create a JSFiddle if you have trouble recreating this.
The text was updated successfully, but these errors were encountered: