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

Side by Side Diff: third_party/polymer/v0_8/components-chromium/iron-selector/iron-selector-extracted.js

Issue 1162563004: Upgrade to 1.0 and switch clients to dom-repeat where needed. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix a layout import and remove the gzipped webanimation in reproduce.sh Created 5 years, 6 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 unified diff | Download patch
OLDNEW
1 1
2 /**
3 `iron-selector` is an element which can be used to manage a list of elements
4 that can be selected. Tapping on the item will make the item selected. The ` selected` indicates
5 which item is being selected. The default is to use the index of the item.
6
7 Example:
8
9 <iron-selector selected="0">
10 <div>Item 1</div>
11 <div>Item 2</div>
12 <div>Item 3</div>
13 </iron-selector>
14
15 If you want to use the attribute value of an element for `selected` instead of the index,
16 set `attrForSelected` to the name of the attribute. For example, if you want to select item by
17 `name`, set `attrForSelected` to `name`.
18
19 Example:
20
21 <iron-selector attr-for-selected="name" selected="foo">
22 <div name="foo">Foo</div>
23 <div name="bar">Bar</div>
24 <div name="zot">Zot</div>
25 </iron-selector>
26
27 `iron-selector` is not styled. Use the `iron-selected` CSS class to style the selected element.
28
29 Example:
30
31 <style>
32 .iron-selected {
33 background: #eee;
34 }
35 </style>
36
37 ...
38
39 <iron-selector selected="0">
40 <div>Item 1</div>
41 <div>Item 2</div>
42 <div>Item 3</div>
43 </iron-selector>
44
45 @demo demo/index.html
46 */
2 47
3 Polymer({ 48 Polymer({
4 49
5 is: 'iron-selector', 50 is: 'iron-selector',
6 51
7 behaviors: [ 52 behaviors: [
8 Polymer.IronMultiSelectableBehavior 53 Polymer.IronMultiSelectableBehavior
9 ] 54 ]
10 55
11 }); 56 });
12 57
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698