0.1.15 • Published 3 years ago

@bbones1967/atree v0.1.15

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

ATree

Simple async tree structure viewer with additional search component

Use

Example:

https://github.com/bbones/atree-demo

<SearchBar :searcher="searcher" @select="onSelect"></SearchBar>
<ATree 
    :loader="loader" 
    :path="[]" 
    :highlight="highlight"
    @nodeClicked="onNodeClicked">
</ATree>

SearchBar

Props

  • searcher - function with api call for incremental search. Returns array of nodes
  • prompt - string parameter for prompt default "Search: "

Events

  • select event in search results list

Atree

Props

  • loader(parent_id) - function api call loading nodes by given parent_id. Returns array
  • highlight - array of node ids from root to particular node that will be expanded and shown

Events

  • nodeClicked occurs when user clicks a node text
  • nodeContextMenu occurs when user clicks right mouse or hold tap a node text

Node states

  • isLoaded - false before emit
  • isVisible - show

Project setup

npm install

Compiles example and hot-reloads for development

npm run serve

Lints and fixes files

npm run lint
0.1.15

3 years ago

0.1.13

3 years ago

0.1.14

3 years ago

0.1.10

3 years ago

0.1.11

3 years ago

0.1.12

3 years ago

0.1.8

3 years ago

0.1.9

3 years ago

0.1.7

3 years ago

0.1.4

3 years ago

0.1.6

3 years ago

0.1.5

3 years ago

0.1.3

3 years ago

0.1.2

3 years ago

0.1.1

3 years ago

0.1.0

3 years ago