File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed
src/app/components/domain-things/domain-filters Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change 1414 < p-multiSelect
1515 id ="field-filters "
1616 [options] ="fieldOptions "
17- [(ngModel)] ="selectedFields "
17+ [(ngModel)] ="selectedFieldsList "
1818 (onChange) ="onSelectionChange() "
1919 optionLabel ="label "
2020 selectedItemsLabel ="{0} fields shown "
2121 [style] ="{minWidth: '200px'} "
2222 placeholder ="Choose visible fields "
23- > </ p-multiSelect >
23+ / >
2424 </ div >
2525 <!-- Sort Select Dropdown -->
2626 < div class ="flex flex-col gap-1 " *ngIf ="selectedLayout ">
Original file line number Diff line number Diff line change @@ -50,6 +50,7 @@ export class FieldVisibilityFilterComponent implements OnInit {
5050 @Output ( ) $triggerReload = new EventEmitter ( ) ;
5151
5252 selectedFields : FieldOption [ ] = [ ] ;
53+ selectedFieldsList : string [ ] = [ ] ;
5354 sortOrder : FieldOption = this . sortOptions [ 0 ] ;
5455 selectedLayout : boolean = true ;
5556 quickAddDialogOpen : boolean = false ;
@@ -95,13 +96,17 @@ export class FieldVisibilityFilterComponent implements OnInit {
9596 this . selectedFields = this . fieldOptions . filter ( option =>
9697 this . defaultSelectedFields . includes ( option . value )
9798 ) ;
99+ this . selectedFieldsList = this . selectedFields . map ( field => field . value ) ;
98100 this . onSelectionChange ( ) ;
99101 }
100102
101103 onSelectionChange ( ) {
102104 if ( this . selectedFields . length === 0 ) {
103105 this . initializeSelectedFields ( ) ;
104106 }
107+ this . selectedFields = this . fieldOptions . filter ( option =>
108+ this . selectedFieldsList . includes ( option . value )
109+ ) ;
105110 this . visibilityChange . emit ( this . selectedFields ) ;
106111 }
107112
You can’t perform that action at this time.
0 commit comments