aboutsummaryrefslogtreecommitdiff
path: root/node_modules
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules')
-rw-r--r--node_modules/components-data/textfield.json4
-rw-r--r--node_modules/montage/ui/text-input.js22
2 files changed, 26 insertions, 0 deletions
diff --git a/node_modules/components-data/textfield.json b/node_modules/components-data/textfield.json
index 7164b8b3..39c65eab 100644
--- a/node_modules/components-data/textfield.json
+++ b/node_modules/components-data/textfield.json
@@ -7,6 +7,10 @@
7 7
8 "properties": [ 8 "properties": [
9 { 9 {
10 "name": "valueBinding",
11 "type": "string",
12 "default": null
13 },{
10 "name": "accept", 14 "name": "accept",
11 "type": "string", 15 "type": "string",
12 "default": null 16 "default": null
diff --git a/node_modules/montage/ui/text-input.js b/node_modules/montage/ui/text-input.js
index cdd20c78..d707fa69 100644
--- a/node_modules/montage/ui/text-input.js
+++ b/node_modules/montage/ui/text-input.js
@@ -79,6 +79,28 @@ var TextInput = exports.TextInput = Montage.create(NativeControl, {
79 } 79 }
80 }, 80 },
81 81
82 _valueBinding: {
83 value: null
84 },
85
86 valueBinding: {
87 get: function() {
88 return this._valueBinding;
89 },
90 set: function(value) {
91 if (this._valueBinding !== value) {
92 if (this._valueBinding !== null) {
93 Object.deleteBinding(this, "value");
94 }
95 this._valueBinding = value;
96 if (String.isString(value)) {
97 Object.defineBinding(this, "value", {boundObject: this.ownerComponent, boundObjectPropertyPath: value});
98
99 }
100 }
101 }
102 },
103
82 // set value from user input 104 // set value from user input
83 /** 105 /**
84 @private 106 @private