@@ -68,38 +68,41 @@ const DEFAULT_CHIP_FOCUS_DELAY = 50;
68
68
templateUrl : './query-builder-tree.component.html' ,
69
69
host : { 'class' : 'igx-query-builder-tree' } ,
70
70
imports : [
71
- DatePipe ,
72
- FormsModule ,
73
- IgxButtonDirective ,
74
- IgxCheckboxComponent ,
75
- IgxChipComponent ,
76
- IgxComboComponent ,
77
- IgxComboHeaderDirective ,
78
- IgxDatePickerComponent ,
79
- IgxDateTimeEditorDirective ,
80
- IgxDialogComponent ,
81
- IgxDragIgnoreDirective ,
82
- IgxDropDirective ,
83
- IgxDropDownComponent ,
84
- IgxDropDownItemComponent ,
85
- IgxDropDownItemNavigationDirective ,
86
- IgxFieldFormatterPipe ,
87
- IgxIconButtonDirective ,
88
- IgxIconComponent ,
89
- IgxInputDirective ,
90
- IgxInputGroupComponent ,
91
- IgxOverlayOutletDirective ,
92
- IgxPickerClearComponent ,
93
- IgxPickerToggleComponent ,
94
- IgxPrefixDirective ,
95
- IgxSelectComponent ,
96
- IgxSelectItemComponent ,
97
- IgxTimePickerComponent ,
98
- IgxTooltipDirective ,
99
- IgxTooltipTargetDirective ,
100
- NgClass ,
101
- NgTemplateOutlet
102
- ]
71
+ DatePipe ,
72
+ FormsModule ,
73
+ IgxButtonDirective ,
74
+ IgxCheckboxComponent ,
75
+ IgxChipComponent ,
76
+ IgxComboComponent ,
77
+ IgxComboHeaderDirective ,
78
+ IgxDatePickerComponent ,
79
+ IgxDateTimeEditorDirective ,
80
+ IgxDialogComponent ,
81
+ IgxDragIgnoreDirective ,
82
+ IgxDropDirective ,
83
+ IgxDropDownComponent ,
84
+ IgxDropDownItemComponent ,
85
+ IgxDropDownItemNavigationDirective ,
86
+ IgxFieldFormatterPipe ,
87
+ IgxIconButtonDirective ,
88
+ IgxIconComponent ,
89
+ IgxInputDirective ,
90
+ IgxInputGroupComponent ,
91
+ IgxOverlayOutletDirective ,
92
+ IgxPickerClearComponent ,
93
+ IgxPickerToggleComponent ,
94
+ IgxPrefixDirective ,
95
+ IgxSelectComponent ,
96
+ IgxSelectItemComponent ,
97
+ IgxTimePickerComponent ,
98
+ IgxTooltipDirective ,
99
+ IgxTooltipTargetDirective ,
100
+ NgClass ,
101
+ NgTemplateOutlet
102
+ ] ,
103
+ providers : [
104
+ IgxQueryBuilderDragService
105
+ ]
103
106
} )
104
107
export class IgxQueryBuilderTreeComponent implements AfterViewInit , OnDestroy {
105
108
/**
@@ -519,11 +522,12 @@ export class IgxQueryBuilderTreeComponent implements AfterViewInit, OnDestroy {
519
522
}
520
523
521
524
constructor ( public cdr : ChangeDetectorRef ,
525
+ public dragService : IgxQueryBuilderDragService ,
522
526
protected platform : PlatformUtil ,
523
- protected el : ElementRef ,
524
527
private elRef : ElementRef ,
525
528
@Inject ( LOCALE_ID ) protected _localeId : string ) {
526
529
this . locale = this . locale || this . _localeId ;
530
+ this . dragService . register ( this , elRef ) ;
527
531
}
528
532
529
533
/**
@@ -840,7 +844,10 @@ export class IgxQueryBuilderTreeComponent implements AfterViewInit, OnDestroy {
840
844
}
841
845
}
842
846
843
- private deleteItem = ( expressionItem : ExpressionItem , skipEmit : boolean = false ) => {
847
+ /**
848
+ * @hidden @internal
849
+ */
850
+ public deleteItem = ( expressionItem : ExpressionItem , skipEmit : boolean = false ) => {
844
851
if ( ! expressionItem . parent ) {
845
852
this . rootGroup = null ;
846
853
this . currentGroup = null ;
@@ -1023,15 +1030,13 @@ export class IgxQueryBuilderTreeComponent implements AfterViewInit, OnDestroy {
1023
1030
this . deleteItem ( expressionItem ) ;
1024
1031
}
1025
1032
1026
- private focusChipAfterDrag = ( index : number ) => {
1027
- this . _lastFocusedChipIndex = index ;
1028
- this . focusEditedExpressionChip ( ) ;
1029
- }
1030
-
1031
1033
/**
1032
1034
* @hidden @internal
1033
1035
*/
1034
- public dragService : IgxQueryBuilderDragService = new IgxQueryBuilderDragService ( this , this . el , this . deleteItem , this . focusChipAfterDrag ) ;
1036
+ public focusChipAfterDrag = ( index : number ) => {
1037
+ this . _lastFocusedChipIndex = index ;
1038
+ this . focusEditedExpressionChip ( ) ;
1039
+ }
1035
1040
1036
1041
/**
1037
1042
* @hidden @internal
0 commit comments