forked from jasongardnerlv/radium-datagrid
-
Notifications
You must be signed in to change notification settings - Fork 0
/
radium-datagrid-row.html
45 lines (45 loc) · 1.06 KB
/
radium-datagrid-row.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
<dom-module id="radium-datagrid-row">
<style is="custom-style">
:host {
@apply(--layout-horizontal);
@apply(--layout-center);
}
:host ::content radium-datagrid-column:first-of-type #dgcolumn {
margin-left: 24px;
}
:host[selected] {
background-color: #F5F5F5;
}
</style>
<template>
<content></content>
</template>
</dom-module>
<script>
(function() {
Polymer({
is: 'radium-datagrid-row',
properties: {
/**
* If using row selection, be sure to bind this to the 'selected' variable in scope
* i.e. selected="[[selected]]"
*/
selected: {
type: Boolean,
value: false,
reflectToAttribute: true
}
},
_dblclickHander: function() {
this.fire('row-dblclick', this.dataHost.row);
},
attached: function() {
var grid = this.domHost;
if (!grid._headers) {
grid._setHeaders(this);
}
this.listen(this, 'dblclick', '_dblclickHander')
},
});
})();
</script>