Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(574)

Unified Diff: lib/paper_radio_group.dart

Issue 1418513006: update elements and fix some bugs (Closed) Base URL: git@github.com:dart-lang/polymer_elements.git@master
Patch Set: code review updates Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « lib/paper_radio_button_nodart.html ('k') | lib/paper_radio_group.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/paper_radio_group.dart
diff --git a/lib/paper_radio_group.dart b/lib/paper_radio_group.dart
index 1189ed89763dd9ab2492264e8f74c7874c071af4..20e8af09afcd97ffe0426b36b8f2d366104f050b 100644
--- a/lib/paper_radio_group.dart
+++ b/lib/paper_radio_group.dart
@@ -12,11 +12,16 @@ import 'iron_a11y_keys_behavior.dart';
import 'iron_selectable.dart';
import 'paper_radio_button.dart';
-/// `paper-radio-group` allows user to select only one radio button from a set.
+/// Material design: [Radio button](https://www.google.com/design/spec/components/selection-controls.html#selection-controls-radio-button)
+///
+/// `paper-radio-group` allows user to select at most one radio button from a set.
/// Checking one radio button that belongs to a radio group unchecks any
/// previously checked radio button within the same group. Use
/// `selected` to get or set the selected radio button.
///
+/// The <paper-radio-buttons> inside the group must have the `name` attribute
+/// set.
+///
/// Example:
///
/// <paper-radio-group selected="small">
@@ -25,13 +30,25 @@ import 'paper_radio_button.dart';
/// <paper-radio-button name="large">Large</paper-radio-button>
/// </paper-radio-group>
///
-/// See <a href="paper-radio-button.html">paper-radio-button</a> for more
+/// Radio-button-groups can be made optional, and allow zero buttons to be selected:
+///
+/// <paper-radio-group selected="small" allow-empty-selection>
+/// <paper-radio-button name="small">Small</paper-radio-button>
+/// <paper-radio-button name="medium">Medium</paper-radio-button>
+/// <paper-radio-button name="large">Large</paper-radio-button>
+/// </paper-radio-group>
+///
+/// See <a href="paper-radio-button">paper-radio-button</a> for more
/// information about `paper-radio-button`.
@CustomElementProxy('paper-radio-group')
class PaperRadioGroup extends HtmlElement with CustomElementProxyMixin, PolymerBase, IronA11yKeysBehavior, IronSelectableBehavior {
PaperRadioGroup.created() : super.created();
factory PaperRadioGroup() => new Element.tag('paper-radio-group');
+ /// If true, radio-buttons can be deselected
+ bool get allowEmptySelection => jsElement[r'allowEmptySelection'];
+ set allowEmptySelection(bool value) { jsElement[r'allowEmptySelection'] = value; }
+
/// Overriden from Polymer.IronSelectableBehavior
String get attrForSelected => jsElement[r'attrForSelected'];
set attrForSelected(String value) { jsElement[r'attrForSelected'] = value; }
« no previous file with comments | « lib/paper_radio_button_nodart.html ('k') | lib/paper_radio_group.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698