@@ -80,12 +80,13 @@ export class IgxGridFilteringRowComponent implements AfterViewInit, OnDestroy {
8080
8181 @Input ( )
8282 public get value ( ) : any {
83- return this . expression ? this . expression . searchVal : null ;
83+ return this . _value ;
8484 }
8585
8686 public set value ( val ) {
8787 if ( ! val && val !== 0 && ( this . expression . searchVal || this . expression . searchVal === 0 ) ) {
8888 this . expression . searchVal = null ;
89+ this . _value = null ;
8990 const index = this . expressionsList . findIndex ( item => item . expression === this . expression ) ;
9091 if ( index === 0 && this . expressionsList . length === 1 ) {
9192 this . filteringService . clearFilter ( this . column . field ) ;
@@ -105,6 +106,7 @@ export class IgxGridFilteringRowComponent implements AfterViewInit, OnDestroy {
105106 return ;
106107 }
107108
109+ this . _value = val ;
108110 this . expression . searchVal = DataUtil . parseValue ( this . column . dataType , val ) ;
109111 if ( this . expressionsList . find ( item => item . expression === this . expression ) === undefined ) {
110112 this . addExpression ( true ) ;
@@ -209,6 +211,7 @@ export class IgxGridFilteringRowComponent implements AfterViewInit, OnDestroy {
209211 private isKeyPressed = false ;
210212 private isComposing = false ;
211213 private _cancelChipClick = false ;
214+ private _value = null ;
212215
213216 /** switch to icon buttons when width is below 432px */
214217 private readonly NARROW_WIDTH_THRESHOLD = 432 ;
@@ -238,6 +241,7 @@ export class IgxGridFilteringRowComponent implements AfterViewInit, OnDestroy {
238241 const selectedItem = this . expressionsList . find ( expr => expr . isSelected === true ) ;
239242 if ( selectedItem ) {
240243 this . expression = selectedItem . expression ;
244+ this . _value = this . expression . searchVal ;
241245 }
242246
243247 this . filteringService . grid . localeChange
@@ -358,9 +362,6 @@ export class IgxGridFilteringRowComponent implements AfterViewInit, OnDestroy {
358362 // The 'iskeyPressed' flag is needed for a case in IE, because the input event is fired on focus and for some reason,
359363 // when you have a japanese character as a placeholder, on init the value here is empty string .
360364 const target = eventArgs . target ;
361- if ( ( eventArgs . data === '-' || eventArgs . data === '+' ) && this . column . dataType === GridColumnDataType . Number ) {
362- return ;
363- }
364365 if ( this . column . dataType === GridColumnDataType . DateTime ) {
365366 this . value = eventArgs ;
366367 return ;
@@ -464,6 +465,7 @@ export class IgxGridFilteringRowComponent implements AfterViewInit, OnDestroy {
464465 this . removeExpression ( indexToDeselect , this . expression ) ;
465466 }
466467 this . resetExpression ( ) ;
468+ this . _value = this . expression . searchVal ;
467469 this . scrollChipsWhenAddingExpression ( ) ;
468470 }
469471
@@ -637,7 +639,7 @@ export class IgxGridFilteringRowComponent implements AfterViewInit, OnDestroy {
637639 item . isSelected = ! item . isSelected ;
638640 if ( item . isSelected ) {
639641 this . expression = item . expression ;
640-
642+ this . _value = this . expression . searchVal ;
641643 this . focusEditElement ( ) ;
642644 }
643645 }
0 commit comments