File tree Expand file tree Collapse file tree
projects/bootstrapcomponents/src/typeahead Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -145,17 +145,16 @@ export class ServoyBootstrapTypeahead extends ServoyBootstrapBasefield<HTMLInput
145145
146146 pushUpdate ( ) {
147147 if ( ! this . dataProviderID && ! this . isEditable ( ) ) {
148+ // need to restore value from UI
148149 if ( this . valuelistID ) {
149- const allowEmptyValue = this . valuelistID [ 0 ] ?. displayValue === '' && this . valuelistID [ 0 ] ?. realValue === null ;
150- if ( ! allowEmptyValue ) {
151- if ( this . valuelistID [ 0 ] ?. displayValue && this . valuelistID [ 0 ] ?. realValue && this . elementRef . nativeElement . value === this . valuelistID [ 0 ] ?. displayValue ) {
152- this . dataProviderID = this . valuelistID [ 0 ] ?. realValue ;
153- this . currentValue = this . dataProviderID ;
154- } else {
155- this . dataProviderID = this . currentValue ;
156- }
157- return ;
150+ if ( this . elementRef . nativeElement . value === this . valuelistID [ 0 ] ?. displayValue ) {
151+ this . dataProviderID = this . valuelistID [ 0 ] ?. realValue ;
152+ this . currentValue = this . dataProviderID ;
153+ super . pushUpdate ( ) ;
154+ } else {
155+ this . dataProviderID = this . currentValue ;
158156 }
157+ return ;
159158 } else {
160159 this . dataProviderID = this . elementRef . nativeElement . value ;
161160 }
You can’t perform that action at this time.
0 commit comments