diff options
Diffstat (limited to 'node_modules/montage')
-rw-r--r-- | node_modules/montage/ui/text-input.js | 22 |
1 files changed, 22 insertions, 0 deletions
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 |