From 2e6a6c19b43e69eec0548a54bf3266beee6bf7c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=C3=A9=20TINANT?= Date: Thu, 13 Jul 2017 19:18:17 +0200 Subject: [PATCH] feat: add default options for idField, textField & childrenField --- src/demo/app/app.module.ts | 4 ++-- src/demo/app/components/flat.component.html | 4 ---- src/lib/src/component/tree-select.component.ts | 3 +++ src/lib/src/model/tree-select-default-options.ts | 3 +++ 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/demo/app/app.module.ts b/src/demo/app/app.module.ts index b8e6361..c623780 100644 --- a/src/demo/app/app.module.ts +++ b/src/demo/app/app.module.ts @@ -6,7 +6,7 @@ import { NgxTreeSelectModule } from 'ngx-tree-select'; import { Ng2BootstrapModule } from 'ngx-bootstrap'; import { AppComponent } from './app.component'; -import { FlatComponent } from "app/components/flat.component"; +import { FlatComponent } from "./components/flat.component"; import { HierarchicalComponent } from './components/hierarchical.component'; import { AppRoutes } from './app.routes'; @@ -16,7 +16,7 @@ import { AppRoutes } from './app.routes'; FormsModule, RouterModule.forRoot(AppRoutes), Ng2BootstrapModule.forRoot(), - NgxTreeSelectModule.forRoot({ filterPlaceholder: 'test', maxVisibleItemCount: 3 }) + NgxTreeSelectModule.forRoot({ idField: 'id', textField: 'name' }) ], declarations: [ AppComponent, diff --git a/src/demo/app/components/flat.component.html b/src/demo/app/components/flat.component.html index 089fdd2..e3e3d23 100644 --- a/src/demo/app/components/flat.component.html +++ b/src/demo/app/components/flat.component.html @@ -8,8 +8,6 @@

Exemple ngx-tree-select with flat datas

Exemple ngx-tree-select with flat datas