From e018d4f96172334a0cd2f41c977b5aa6991edeb0 Mon Sep 17 00:00:00 2001 From: Yubing325 <35515298+Yubing325@users.noreply.github.com> Date: Tue, 23 Jun 2020 15:14:07 -0500 Subject: [PATCH] sorting & filtering 1st version done --- .../number-filter.component.html | 58 +++++++++++++++++- .../number-filter/number-filter.component.ts | 30 ++++++++-- .../text-filter/text-filter.component.html | 27 ++++++--- .../text-filter/text-filter.component.ts | 53 ++++++++++------ .../lib/grid-sorting/grid-sorting.module.ts | 14 +++++ .../grid-sorting/grid-sorting.component.html | 4 ++ .../grid-sorting/grid-sorting.component.scss | 16 +++++ .../grid-sorting/grid-sorting.component.ts | 60 +++++++++++++++++++ .../ngx-bootstrap/src/public-api.ts | 4 +- .../src/lib/data-grid/data-grid.module.ts | 5 +- .../data-grid/data-grid.component.html | 29 ++++++--- .../data-grid/data-grid.component.scss | 8 +++ .../data-grid/data-grid.component.ts | 31 +++++++++- .../data-grid-col-sort.directive.ts | 10 ++++ .../directives/data-grid-col.directive.ts | 7 ++- .../poweredsoft/ngx-cdk-ui/src/public-api.ts | 3 +- src/app/app-routing.module.ts | 2 +- .../grid-filter-demo-routing.module.ts | 0 .../grid-filter-demo.module.ts | 5 +- .../grid-filter-demo.component.html | 12 +++- .../grid-filter-demo.component.scss | 0 .../grid-filter-demo.component.ts | 8 +-- 22 files changed, 327 insertions(+), 59 deletions(-) create mode 100644 projects/poweredsoft/ngx-bootstrap/src/lib/grid-sorting/grid-sorting.module.ts create mode 100644 projects/poweredsoft/ngx-bootstrap/src/lib/grid-sorting/grid-sorting/grid-sorting.component.html create mode 100644 projects/poweredsoft/ngx-bootstrap/src/lib/grid-sorting/grid-sorting/grid-sorting.component.scss create mode 100644 projects/poweredsoft/ngx-bootstrap/src/lib/grid-sorting/grid-sorting/grid-sorting.component.ts create mode 100644 projects/poweredsoft/ngx-cdk-ui/src/lib/data-grid/directives/data-grid-col-sort.directive.ts rename src/app/{grid-filter-demo => grid-filter&sorting-demo}/grid-filter-demo-routing.module.ts (100%) rename src/app/{grid-filter-demo => grid-filter&sorting-demo}/grid-filter-demo.module.ts (84%) rename src/app/{grid-filter-demo => grid-filter&sorting-demo}/grid-filter-demo/grid-filter-demo.component.html (78%) rename src/app/{grid-filter-demo => grid-filter&sorting-demo}/grid-filter-demo/grid-filter-demo.component.scss (100%) rename src/app/{grid-filter-demo => grid-filter&sorting-demo}/grid-filter-demo/grid-filter-demo.component.ts (82%) diff --git a/projects/poweredsoft/ngx-bootstrap/src/lib/grid-filter/number-filter/number-filter.component.html b/projects/poweredsoft/ngx-bootstrap/src/lib/grid-filter/number-filter/number-filter.component.html index 0b4e9b1..20d809a 100644 --- a/projects/poweredsoft/ngx-bootstrap/src/lib/grid-filter/number-filter/number-filter.component.html +++ b/projects/poweredsoft/ngx-bootstrap/src/lib/grid-filter/number-filter/number-filter.component.html @@ -1 +1,57 @@ -
number-filter works!
+Do you want to confirm?
diff --git a/src/app/grid-filter-demo/grid-filter-demo/grid-filter-demo.component.scss b/src/app/grid-filter&sorting-demo/grid-filter-demo/grid-filter-demo.component.scss similarity index 100% rename from src/app/grid-filter-demo/grid-filter-demo/grid-filter-demo.component.scss rename to src/app/grid-filter&sorting-demo/grid-filter-demo/grid-filter-demo.component.scss diff --git a/src/app/grid-filter-demo/grid-filter-demo/grid-filter-demo.component.ts b/src/app/grid-filter&sorting-demo/grid-filter-demo/grid-filter-demo.component.ts similarity index 82% rename from src/app/grid-filter-demo/grid-filter-demo/grid-filter-demo.component.ts rename to src/app/grid-filter&sorting-demo/grid-filter-demo/grid-filter-demo.component.ts index a232ed8..30b4e00 100644 --- a/src/app/grid-filter-demo/grid-filter-demo/grid-filter-demo.component.ts +++ b/src/app/grid-filter&sorting-demo/grid-filter-demo/grid-filter-demo.component.ts @@ -1,5 +1,5 @@ import { Component, OnInit } from '@angular/core'; -import { IDataSource } from '@poweredsoft/data'; +import { IDataSource, ISimpleFilter } from '@poweredsoft/data'; import { IMerchant } from 'src/app/data/services/IMerchant'; import { MerchantService } from 'src/app/data/services/merchant.service'; import { ConfirmModalService } from '@poweredsoft/ngx-bootstrap'; @@ -32,9 +32,5 @@ export class GridFilterDemoComponent implements OnInit { } - filterMerchants(event){ - this.somefilter = event; - this.merchantDataSource.filters[0]=this.somefilter; - this.merchantDataSource.refresh(); - } + }