Skip to content

Commit c16c813

Browse files
committed
SVYX-926 TiNG Typehead issue when NULL has a displayValue
ngmodel needs to be able to also push te value back else a (change) even will not be generated.
1 parent 0bd851f commit c16c813

2 files changed

Lines changed: 8 additions & 2 deletions

File tree

projects/bootstrapcomponents/src/typeahead/typeahead.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
[svyStartEdit]="'dataProviderID'"
66
[hostComponent]="this"
77
[svyTabFix]="this"
8-
[ngModel]="dataProvider"
8+
[(ngModel)]="dataProvider"
99
(change)="pushUpdate()"
1010
(selectItem)="valueChanged($event)"
1111
[sabloTabseq]="tabSeq"

projects/bootstrapcomponents/src/typeahead/typeahead.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,13 @@ export class ServoyBootstrapTypeahead extends ServoyBootstrapBasefield<HTMLInput
6969
if (this.dataProviderID === null) return this.NULL_VALUE;
7070
return this.dataProviderID;
7171
}
72-
72+
73+
set dataProvider(value){
74+
if (value === this.NULL_VALUE) this.dataProviderID = null;
75+
else this.dataProviderID = value;
76+
77+
}
78+
7379
svyOnChanges(changes: SimpleChanges) {
7480
super.svyOnChanges(changes);
7581
if (changes.enabled || changes.findmode) {

0 commit comments

Comments
 (0)