Skip to content

Commit 2b9974e

Browse files
committed
fix #31
1 parent 48ddf54 commit 2b9974e

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

drop-down.ios.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,14 @@ export class DropDown extends common.DropDown {
116116
}
117117

118118
public _onItemsPropertyChanged(data: dependencyObservable.PropertyChangeData) {
119+
let isNothingSelected: boolean = types.isNullOrUndefined(this.selectedIndex);
120+
119121
this._listPicker.items = data.newValue;
122+
123+
// HACK: This is needed, because in the listpicker module Telerik automatically selects the first item if the current selectedIndex is undefined.
124+
if (isNothingSelected) {
125+
this.selectedIndex = null;
126+
}
120127
}
121128

122129
public _onHintPropertyChanged(data: dependencyObservable.PropertyChangeData) {
@@ -218,6 +225,7 @@ class DropDownLabelWrapper extends Label {
218225
public onLoaded() {
219226
super.onLoaded();
220227
this.internalColor = this.color;
228+
this.text = "";
221229
}
222230

223231
get text(): string {

0 commit comments

Comments
 (0)