OLD | NEW |
1 # iron-autogrow-textarea | 1 # iron-autogrow-textarea |
2 | 2 |
3 `iron-autogrow-textarea` is an element containing a textarea that grows in heigh
t as more | 3 `iron-autogrow-textarea` is an element containing a textarea that grows in heigh
t as more |
4 lines of input are entered. Unless an explicit height or the `maxRows` property
is set, it will | 4 lines of input are entered. Unless an explicit height or the `maxRows` property
is set, it will |
5 never scroll. | 5 never scroll. |
6 | 6 |
7 Example: | 7 Example: |
8 | 8 |
9 <iron-autogrow-textarea id="a1"> | 9 <iron-autogrow-textarea id="a1"> |
10 <textarea id="t1"></textarea> | 10 <textarea id="t1"></textarea> |
11 </iron-autogrow-textarea> | 11 </iron-autogrow-textarea> |
12 | 12 |
13 Because the `textarea`'s `value` property is not observable, you should use | 13 Because the `textarea`'s `value` property is not observable, you should use |
14 this element's `bind-value` instead for imperative updates. Alternatively, if | 14 this element's `bind-value` instead for imperative updates. Alternatively, if |
15 you do set the `textarea`'s `value` imperatively, you must also call `update` | 15 you do set the `textarea`'s `value` imperatively, you must also call `update` |
16 to notify this element the value has changed. | 16 to notify this element the value has changed. |
17 | 17 |
18 Example: | 18 Example: |
19 /* preferred, using the example HTML above*/ | 19 /* preferred, using the example HTML above*/ |
20 a1.bindValue = 'some\ntext'; | 20 a1.bindValue = 'some\ntext'; |
21 | 21 |
22 /* alternatively, */ | 22 /* alternatively, */ |
23 t1.value = 'some\ntext'; | 23 t1.value = 'some\ntext'; |
24 a1.update(); | 24 a1.update(); |
OLD | NEW |