@@ -141,7 +141,7 @@ export class IgxGridFilteringRowComponent implements AfterViewInit {
141
141
@HostBinding ( 'class.igx-grid__filtering-row' )
142
142
public cssClass = 'igx-grid__filtering-row' ;
143
143
144
- constructor ( public filteringService : IgxFilteringService , public element : ElementRef , public cdr : ChangeDetectorRef ) { }
144
+ constructor ( public filteringService : IgxFilteringService , public element : ElementRef , public cdr : ChangeDetectorRef ) { }
145
145
146
146
ngAfterViewInit ( ) {
147
147
this . _conditionsOverlaySettings . outlet = this . column . grid . outletDirective ;
@@ -216,14 +216,16 @@ export class IgxGridFilteringRowComponent implements AfterViewInit {
216
216
* Event handler for keydown on the input group's prefix.
217
217
*/
218
218
public onPrefixKeyDown ( event : KeyboardEvent ) {
219
- if ( ( event . key === KEYS . ENTER || event . key === KEYS . SPACE || event . key === KEYS . SPACE_IE ) &&
220
- this . dropDownConditions . collapsed ) {
221
- this . _conditionsOverlaySettings . positionStrategy . settings . target = this . inputGroupPrefix . nativeElement ;
222
- this . dropDownConditions . toggle ( this . _conditionsOverlaySettings ) ;
219
+ if ( ( event . key === KEYS . ENTER || event . key === KEYS . SPACE || event . key === KEYS . SPACE_IE ) && this . dropDownConditions . collapsed ) {
220
+ this . toggleConditionsDropDown ( this . inputGroupPrefix . nativeElement ) ;
223
221
event . stopImmediatePropagation ( ) ;
224
- } else if ( event . key === KEYS . TAB && event . shiftKey ) {
225
- event . preventDefault ( ) ;
226
- event . stopPropagation ( ) ;
222
+ } else if ( event . key === KEYS . TAB ) {
223
+ if ( event . shiftKey ) {
224
+ event . preventDefault ( ) ;
225
+ event . stopPropagation ( ) ;
226
+ } else if ( ! this . dropDownConditions . collapsed ) {
227
+ this . toggleConditionsDropDown ( this . inputGroupPrefix . nativeElement ) ;
228
+ }
227
229
}
228
230
}
229
231
@@ -234,12 +236,8 @@ export class IgxGridFilteringRowComponent implements AfterViewInit {
234
236
this . isKeyPressed = true ;
235
237
236
238
if ( this . column . dataType === DataType . Boolean ) {
237
- if ( ( event . key === KEYS . ENTER || event . key === KEYS . SPACE || event . key === KEYS . SPACE_IE ) &&
238
- this . dropDownConditions . collapsed ) {
239
- this . toggleConditionsDropDown ( this . inputGroupPrefix . nativeElement ) ;
240
- event . stopPropagation ( ) ;
241
- return ;
242
- } else if ( ( event . key === KEYS . ESCAPE || event . key === KEYS . ESCAPE_IE ) && ! this . dropDownConditions . collapsed ) {
239
+ if ( event . key === KEYS . ENTER || event . key === KEYS . SPACE || event . key === KEYS . SPACE_IE ) {
240
+ this . inputGroupPrefix . nativeElement . focus ( ) ;
243
241
this . toggleConditionsDropDown ( this . inputGroupPrefix . nativeElement ) ;
244
242
event . stopPropagation ( ) ;
245
243
return ;
@@ -250,10 +248,8 @@ export class IgxGridFilteringRowComponent implements AfterViewInit {
250
248
if ( this . isComposing ) {
251
249
return ;
252
250
}
253
-
254
251
this . commitInput ( ) ;
255
252
} else if ( event . altKey && ( event . key === KEYS . DOWN_ARROW || event . key === KEYS . DOWN_ARROW_IE ) ) {
256
- this . input . nativeElement . blur ( ) ;
257
253
this . inputGroupPrefix . nativeElement . focus ( ) ;
258
254
this . toggleConditionsDropDown ( this . inputGroupPrefix . nativeElement ) ;
259
255
} else if ( event . key === KEYS . ESCAPE || event . key === KEYS . ESCAPE_IE ) {
@@ -299,7 +295,8 @@ export class IgxGridFilteringRowComponent implements AfterViewInit {
299
295
* Event handler for input click event.
300
296
*/
301
297
public onInputClick ( ) {
302
- if ( this . column . dataType === DataType . Boolean ) {
298
+ if ( this . column . dataType === DataType . Boolean && this . dropDownConditions . collapsed ) {
299
+ this . inputGroupPrefix . nativeElement . focus ( ) ;
303
300
this . toggleConditionsDropDown ( this . inputGroupPrefix . nativeElement ) ;
304
301
}
305
302
}
0 commit comments