multi_select_tree 1.0.1

  • README.md
  • CHANGELOG.md
  • Installing
  • Versions
  • 0

angular-dart-material-tree

demo

Prerequisites

Dart packages

  • Polymer
  • Polymer elements
dependencies :
  polymer: 1.0.0-rc.19
  polymer_elements: 1.0.0-rc.10

Installing

Update you pubspec.yaml file to include the above dependencies .

Copy the material-tree/multi-select-tree folder into your lib .

Include the material-tree/multi-select-tree in the imports .

import 'package:angular_dart_data_grid/src/material-tree/material-tree.dart';

Add the CustomMaterialTreeComponent in the directives for material_tree

  directives: const [materialDirectives, CustomMaterialTreeComponent],

Add the MultiSelectTreeComponent in the directives for multi_select_tree

  directives: const [materialDirectives, MultiSelectTreeComponent],

Get the dependecies and run pub build/serve.

Using it in the HTML.

Inputs :

`data : List<>`
      -- Data to be displayed in the tree. Expecting a list here.
   Example:
  treeRootNodes=
  [
    {
     	name: "parent1" ,
      children:[
       	{
     		name : "child1"
     		children : []

     		},
     		{
     		name : "child2"
     		children : []

     		},
     		{
     		name : "child3"
     		children : []
     		}]
     },
     {
     		name: "parent2",
     		children : [
     			{
     				name : "child5"
     				children : []
     			},
     			{
     				name : "child6"
     				children : []
     			}
     			{
     				name : "child7"
     				children : [
     					{
     						name : "child8"
     						children : []

     					},
     					{
     						name : "child9"
     						children : []

     					},
     					{
     						name : "child10"
     						children : []
     					}]
     		    }]
     }
     ]

Events :

  	nodeSelected : AsyncAction<<Node> -- emits the node that is clicked.

Material Tree Usage :

<custom-material-tree (nodeSelected)="nodeSelected($event)" [data]="treeRootNodes" >

	</custom-material-tree>

We can write any function in order to handle the emitted event. I wrote a dummy function nodeSelected which will get the selected node as an arguement automcatically.

The above example will show the checkboxes for each of the row, add/delete button and columns as per the column definitions.

Multi-Select Tree Usage :

     <multi-select-tree (selectedNodes)="nodeSelected($event)" [data]="treeRootNodes" >
	   </multi-select-tree>

Inputs :

same as material-tree.

Events :

  	selectedNodes : AsyncAction<<List<Node>> -- emits the selected  nodes.

Changelog

##1.0.1

  • Added proper docs. ##1.0.0

  • Initial version, created by Stagehand

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  multi_select_tree: ^1.0.1

2. Install it

You can install packages from the command line:

with pub:


$ pub get

Alternatively, your editor might support pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:multi_select_tree/multi_select_tree.dart';
  
Version Uploaded Documentation Archive
1.0.1 Aug 28, 2017 Go to the documentation of multi_select_tree 1.0.1 Download multi_select_tree 1.0.1 archive
1.0.0 Aug 28, 2017 Go to the documentation of multi_select_tree 1.0.0 Download multi_select_tree 1.0.0 archive
Popularity:
Describes how popular the package is relative to other packages. [more]
0
Health:
Code health derived from static analysis. [more]
0
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
0
Overall:
Weighted score of the above. [more]
0
Learn more about scoring.

The package version is not analyzed, because it does not support Dart 2. Until this is resolved, the package will receive a health and maintenance score of 0.

Issues and suggestions

Support Dart 2 in pubspec.yaml.

The SDK constraint in pubspec.yaml doesn't allow the Dart 2.0.0 release. For information about upgrading it to be Dart 2 compatible, please see https://www.dartlang.org/dart-2#migration.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=1.23.0 <2.0.0