@@ -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
/**
@@ -842,7 +846,10 @@ export class IgxQueryBuilderTreeComponent implements AfterViewInit, OnDestroy {
842
846
}
843
847
}
844
848
845
- private deleteItem = ( expressionItem : ExpressionItem , skipEmit : boolean = false ) => {
849
+ /**
850
+ * @hidden @internal
851
+ */
852
+ public deleteItem = ( expressionItem : ExpressionItem , skipEmit : boolean = false ) => {
846
853
if ( ! expressionItem . parent ) {
847
854
this . rootGroup = null ;
848
855
this . currentGroup = null ;
@@ -1025,15 +1032,13 @@ export class IgxQueryBuilderTreeComponent implements AfterViewInit, OnDestroy {
1025
1032
this . deleteItem ( expressionItem ) ;
1026
1033
}
1027
1034
1028
- private focusChipAfterDrag = ( index : number ) => {
1029
- this . _lastFocusedChipIndex = index ;
1030
- this . focusEditedExpressionChip ( ) ;
1031
- }
1032
-
1033
1035
/**
1034
1036
* @hidden @internal
1035
1037
*/
1036
- public dragService : IgxQueryBuilderDragService = new IgxQueryBuilderDragService ( this , this . el , this . deleteItem , this . focusChipAfterDrag ) ;
1038
+ public focusChipAfterDrag = ( index : number ) => {
1039
+ this . _lastFocusedChipIndex = index ;
1040
+ this . focusEditedExpressionChip ( ) ;
1041
+ }
1037
1042
1038
1043
/**
1039
1044
* @hidden @internal
0 commit comments