Skip to content

Commit

Permalink
Merge pull request #61 from EddyVerbruggen/master
Browse files Browse the repository at this point in the history
TextViewWithHint fails with v-model
  • Loading branch information
EddyVerbruggen authored May 28, 2019
2 parents 335456d + a16d265 commit b705493
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 3 deletions.
4 changes: 2 additions & 2 deletions demo/app/main-page.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@
<TextField hint="Password"/>
</StackLayout>
<StackLayout>
<IQKeyboardManager:TextViewWithHint hint="Working TextView hint 🤪"/>
<IQKeyboardManager:TextViewWithHint text="{{ textViewWithHintText }}" hint="Working TextView hint 🤪"/>
</StackLayout>
<StackLayout>
<TextView hint="Not working TextView hint"/>
<TextView text="{{ textViewText }}" hint="Not working TextView hint"/>
</StackLayout>
<StackLayout>
<TextField hint="5"/>
Expand Down
8 changes: 8 additions & 0 deletions demo/app/main-view-model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,19 @@ export class HelloWorldModel extends Observable {
public toggleDoneButtonTextChanged: boolean = false;
public increaseKeyboardDistanceFromTextField: boolean = false;

public textViewText;
public textViewWithHintText;

constructor() {
super();
if (isIOS) {
this.iqKeyboard = IQKeyboardManager.sharedManager();
}

setInterval(() => {
console.log("textViewText: " + this.textViewText);
console.log("textViewWithHintText: " + this.textViewWithHintText);
}, 2000);
}

toggleIQKeyboard(): void {
Expand Down
1 change: 1 addition & 0 deletions src/iqkeyboardmanager.ios.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ export class PreviousNextView extends ContentView {
export class TextViewWithHint extends TextView {
createNativeView() {
const view = IQTextView.new();
this.nativeView = view;
view.placeholder = this.hint;
return view;
}
Expand Down
2 changes: 1 addition & 1 deletion src/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "nativescript-iqkeyboardmanager",
"version": "1.5.0",
"version": "1.5.1",
"description": "NativeScript wrapper of the popular IQKeyboardManager iOS library",
"main": "iqkeyboardmanager",
"typings": "index.d.ts",
Expand Down

0 comments on commit b705493

Please sign in to comment.