OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 Polymer({ | 5 Polymer({ |
6 is: 'controlled-radio-button', | 6 is: 'controlled-radio-button', |
7 | 7 |
8 behaviors: [PrefControlBehavior], | 8 behaviors: [PrefControlBehavior], |
9 | 9 |
10 properties: { | 10 properties: { |
| 11 label: String, |
| 12 |
11 name: { | 13 name: { |
12 type: String, | 14 type: String, |
13 notify: true, | 15 notify: true, |
14 }, | 16 }, |
15 | 17 |
16 /** @private */ | 18 /** @private */ |
17 controlled_: { | 19 controlled_: { |
18 type: Boolean, | 20 type: Boolean, |
19 computed: 'computeControlled_(pref.*)', | 21 computed: 'computeControlled_(pref.*)', |
20 reflectToAttribute: true, | 22 reflectToAttribute: true, |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 // Disallow <controlled-radio-button on-tap="..."> when controlled. | 54 // Disallow <controlled-radio-button on-tap="..."> when controlled. |
53 e.preventDefault(); | 55 e.preventDefault(); |
54 e.stopPropagation(); | 56 e.stopPropagation(); |
55 }, | 57 }, |
56 | 58 |
57 /** Focuses the internal radio button when the row is selected. */ | 59 /** Focuses the internal radio button when the row is selected. */ |
58 onFocus_: function() { | 60 onFocus_: function() { |
59 this.$.radioButton.focus(); | 61 this.$.radioButton.focus(); |
60 }, | 62 }, |
61 }); | 63 }); |
OLD | NEW |