File tree 6 files changed +17
-4
lines changed 6 files changed +17
-4
lines changed Original file line number Diff line number Diff line change 1
1
import { NgModule } from '@angular/core' ;
2
2
3
- @NgModule ( { } )
3
+ import { FuseSearchPipe } from './pipes' ;
4
+
5
+ @NgModule ( {
6
+ declarations : [ FuseSearchPipe ] ,
7
+ exports : [ FuseSearchPipe ] ,
8
+ } )
4
9
export class ModulesSharedModule { }
Original file line number Diff line number Diff line change @@ -4,7 +4,8 @@ import { FuseSearchService } from '../services';
4
4
5
5
@Pipe ( {
6
6
name : 'fuseSearch' ,
7
- pure : false ,
7
+ pure : true ,
8
+ standalone : false ,
8
9
} )
9
10
export class FuseSearchPipe < T > implements PipeTransform {
10
11
constructor ( private searchService : FuseSearchService < T > ) { }
Original file line number Diff line number Diff line change
1
+ export * from './fuse-search.pipe' ;
Original file line number Diff line number Diff line change 87
87
}
88
88
</ rc-toolbar >
89
89
90
- < rc-searchbar />
90
+ < rc-searchbar (search) =" searchTerm = $event " />
91
91
92
92
< vcl-data-list
93
93
[noBorder] ="true "
102
102
< div class ="p-2 "> {{ vm.selectedParent.name }}</ div >
103
103
</ vcl-data-list-item >
104
104
<!-- | fuzzysearch: term -->
105
- } @for (organization of (vm.organizations); track $index) {
105
+ } @for (organization of (vm.organizations | fuseSearch: searchTerm :
106
+ ['name', 'description']); track $index) {
106
107
< vcl-data-list-item [value] ="organization.id ">
107
108
< div class ="p-2 "> {{ organization?.name }}</ div >
108
109
</ vcl-data-list-item >
Original file line number Diff line number Diff line change @@ -32,6 +32,8 @@ export class RcHeaderToolbarComponent implements OnInit {
32
32
@HostBinding ( 'class.row' )
33
33
_hostClasses = true ;
34
34
35
+ searchTerm = '' ;
36
+
35
37
readonly vm$ = combineLatest ( {
36
38
user : this . accountFacade . user$ ,
37
39
organizations : this . organizationFacade . globalChildrenOrganizations$ ,
Original file line number Diff line number Diff line change @@ -33,6 +33,8 @@ import {
33
33
VCLBadgeModule ,
34
34
} from '@vcl/ng-vcl' ;
35
35
36
+ import { ModulesSharedModule } from '@console-modules/shared' ;
37
+
36
38
import {
37
39
RcBusyIndicatorComponent ,
38
40
RcCopyrightComponent ,
@@ -153,6 +155,7 @@ const modules = [
153
155
VCLButtonGroupModule ,
154
156
VCLBadgeModule ,
155
157
VCLFormControlGroupModule ,
158
+ ModulesSharedModule ,
156
159
] ;
157
160
158
161
const atoms = [
You can’t perform that action at this time.
0 commit comments