-
Notifications
You must be signed in to change notification settings - Fork 65
/
data-table-row-detail.html
50 lines (43 loc) · 1.26 KB
/
data-table-row-detail.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
<link rel="import" href="data-table-templatizer-behavior.html">
<dom-module id="data-table-row-detail">
<template>
<style>
:host {
padding: 0 24px 0 24px;
display: flex;
align-items: center;
}
</style>
<content></content>
</template>
<script>
Polymer({
is: 'data-table-row-detail',
behaviors: [
saulis.DataTableTemplatizerBehavior
],
properties: {
beforeBind: Object
},
observers: ['_beforeBind(beforeBind, item.*, index, selected, expanded)'],
attached: function() {
if (!Polymer.Settings.useNativeShadow) {
// details is supposed to be placed outside the local dom of iron-data-table.
Polymer.StyleTransformer.dom(this, 'iron-data-table', this._scopeCssViaAttr, true);
if (this.domHost) {
Polymer.StyleTransformer.dom(this, this.domHost.tagName.toLowerCase(), this._scopeCssViaAttr, false);
}
}
},
_beforeBind: function(beforeBind, item, index, selected, expanded) {
var data = {
index: index,
item: item.base,
expanded: expanded,
selected: selected
};
beforeBind(data, this);
}
});
</script>
</dom-module>