🌜
🌞
jquery.fancytree

jquery.fancytree

v2.38.2

JavaScript tree view / tree grid plugin with support for keyboard, inline editing, filtering, checkboxes, drag'n'drop, and lazy loading

npm install jquery.fancytree

README

logo Fancytree

GitHub version Build Status npm jsDelivr code style: prettier Released with: grunt-yabs StackOverflow: fancytree

Fancytree (sequel of DynaTree 1.x) is a JavaScript tree view / tree grid plugin with support for keyboard, inline editing, filtering, checkboxes, drag'n'drop, and lazy loading.

sample

Status

GitHub version See the change log for details.

NOTE:
Fancytree is considered feature-complete. The code is still maintained and bugfixes will be commited. However do not expect new major features.
Have a look at the Wunderbaum incubator for a potential successor.

Get Started

ES6 Quickstart

import $ from "jquery";

import 'jquery.fancytree/dist/skin-lion/ui.fancytree.less';  // CSS or LESS

import {createTree} from 'jquery.fancytree';

import 'jquery.fancytree/dist/modules/jquery.fancytree.edit';
import 'jquery.fancytree/dist/modules/jquery.fancytree.filter';

const tree = createTree('#tree', {
  extensions: ['edit', 'filter'],
  source: {...},
  ...
});
// Note: Loading and initialization may be asynchronous, so the nodes may not be accessible yet.

See module loader support and API docs.

Credits

Thanks to all contributors.

Release Notes

2.38.2
By Martin Wendt • Published on June 30, 2022

Release 2.38.2 Commit details.

2.38.1
By Martin Wendt • Published on January 14, 2022

Release 2.38.1

  • Replace deprecated jQuery functions: $.isArray(), $.isFunction(), $.trim(), $().click()
  • Update to jQuery 3.6.0 and jQuery UI 1.13.0
  • Update formatter to Prettier 2.0

Commit details.

2.38.0
By Martin Wendt • Published on February 9, 2021
  • [Added] #1041 Make assertions more debuggable
  • [Added] #1051 ext-filter Fuzzy matched title segment is not highlighted
  • [Added] #1053 ext-dnd5 new option dnd5.sourceCopyHook (optional callback passed to toDict on dragStart)
  • [Added] #1054 ext-filter tree.updateFilter()
  • [Fixed] #700 ext-filter Doing fuzzy filtering doesn't escape regex characters like the non fuzzy case
  • [Fixed] #1042 Don't scroll while clicking an embedded link
  • [Fixed] #1045 re-init exception (grid-ext)

Commit details.

2.37.0
By Martin Wendt • Published on September 11, 2020
  • [Changed] #871, #1032 ext-glyph:
    • Support for SVG tags as used by fontawesome 5 with all.js library
    • Improved padding and alignment for skin-awesome icons
    • Allow to pass a callback() as glyph.map<TYPE> option
    • Update Fontwesome demos to v5.0.13
  • [Changed] #1025 ext-dnd5: changed behavior when dndOpts.multiSource is true. Now dragging an unselected node will only drag that single node (while keeping the other nodes selected). You have to drag one of the selected nodes in order to drag the whole group.
  • [Fixed] #1022 ext-persist: Handle 'Access is denied for this document'
  • [Fixed] #1028 Uncaught TypeError: apply is not a function (regression of #1019)
  • [Fixed] #1029 Fast expand/collapse of folder leads to inconsistent state

Commit details.

2.36.1
By Martin Wendt • Published on July 25, 2020
  • [Fixed] #1021 ext-dnd5 Regression in drop marker

Commit details.

2.36.0
By Martin Wendt • Published on July 15, 2020
  • [Changed] #1005 Cast key to string in getNodeByKey()
  • [Changed] #1013 ext-dnd5: log warning when jQuery is too old
  • [Added] #1012 dnd5.dropMarkerParent allows usage in Webcomponents (i.e. shadow DOM)
  • [Added] #1017 copyFunctionsToData allows also copying functions to the data property of the node
  • [Fixed] #921 ext-edit / focus handling: Internet Explorer scrolls briefly to the top/left after editing if the tree container is partially outside the viewport
  • [Fixed] #1001 Invalid urls in skin-xp CSS
  • [Fixed] ext-dnd5: dropEffectCallback=none was not reset in some cases
  • [Fixed] #1018 ContextMenu extension always focuses the first node in the tree

Commit details.

2.35.0
By Martin Wendt • Published on March 27, 2020
  • [Changed] The enableAspx option will default to 'false' in the future. For now, a warning is emitted, to explicitly set it or use the postProcess event instead.
  • [Added] #988 New option dnd5.preventLazyParents prevents dropping items on unloaded lazy nodes (defaults to true)
  • [Fixed] #983 lazyLoad with promise not calling postProcess
  • [Fixed] #984 ext-edit: Exception when cancelling addSibling() or addChildren()
  • [Fixed] #987 Lazy load puts "Load error" for content outside tree div if parent folder is removed before loads ends
  • [Fixed] #989 node.toDict() keeps empty children array
  • [Fixed] #998 dnd5 triggering multiple loads of lazy nodes on hover

Commit details.

2.34.0
By Martin Wendt • Published on December 26, 2019
  • [DEPRECATED] jQuery UI widget methods: Use tree.METHOD() instead of $().fancytree("METHOD").
  • [Added] tree.debugTime(), tree.debugTimeEnd() for debugging.
  • [Added] tree.destroy() as alternative for tree.widget.destroy().
  • [Fixed] $.ui.fancytree.getTree() for Element arg.
  • [Fixed] #973 when use ext-grid in one tree, other tree not use ext-grid has error on click.
  • [Fixed] #974 ext-grid: too much output in production mode.
  • [Fixed] #975 ext-grid: fix tree.visitRows() for empty tree.
  • [Fixed] #978 ext-grid: addChildren() throws error when grid is hidden.

Commit details.

2.33.0
By Martin Wendt • Published on October 29, 2019
  • [Added] event preInit (fired before nodes are loaded).
  • [Changed] jQuery is now a peerDependency (>=1.9), so users can install or re-use their own version.
  • [Changed] ext-grid: updateViewport event is now also triggered for 'renumber' (i.e. expand, collapse)
  • [Fixed] #963: tree.setExpanded() fails when autoScroll is enabled
  • [Fixed] #964: handle case when source is not passed and no <ul> is embedded.
  • [Fixed] #966: Ext-dnd5: bug in function onDropEvent (case 'dragover')
  • [Fixed] ext-filter: sub-match counter is one too high.

Commit details.

2.32.0
By Martin Wendt • Published on September 10, 2019
  • [Added] node.hasClass(className)
  • [Added] tree.applyCommand() and node.applyCommand() (experimental!)
  • [Added] tree.isLoading()
  • [Added] tree.toDict(includeRoot, callback) and node.toDict(recursive, callback): callback can now return false or "skip" to skip nodes.
  • [Fixed] #951 Hover issue in unselectable radio
  • ext-dnd5: allow autoExpand even if dropping is prevented
  • [Fixed] ext-filter: tree.rootNode.subMatchCount is now set correctly
  • [Fixed] #955 node.navigate($.ui.keyCode.DOWN, false) does not return promise
  • Stop testing with jQuery UI 1.10 and 1.11 (only jQuery UI 1.12 remains)

Commit details.

General

License
MIT
Typescript Types
Tree-shakeable
No

Popularity

GitHub Stargazers
2,566
Community Interest
3,127
Number of Forks
583

Maintenance

Commits
10/219/2206
Last Commit
Open Issues
5
Closed Issues
927
Open Pull Requests
2
Closed Pull Requests
67

Versions

Versions Released
10/219/2201
Latest Version Released
Jun 30, 2022
Current Tags
latest2.38.2

Contributors

mar10
mar10
Commits: 1,504
Koloto
Koloto
Commits: 15
ewya
ewya
Commits: 8
rayner133
rayner133
Commits: 6
cuziacmihai
cuziacmihai
Commits: 5
mcspring
mcspring
Commits: 4
norkunas
norkunas
Commits: 4
aleventhal
aleventhal
Commits: 4
wolfmanx
wolfmanx
Commits: 4
HobieCat
HobieCat
Commits: 3
Ariesto
Ariesto
Commits: 3
kachar
kachar
Commits: 3
0cv
0cv
Commits: 3
ittennull
ittennull
Commits: 3
jogibear9988
jogibear9988
Commits: 2