-
Notifications
You must be signed in to change notification settings - Fork 65
/
data-table-column-filter.html
45 lines (40 loc) · 1.07 KB
/
data-table-column-filter.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
<link rel="import" href="../paper-input/paper-input.html">
<dom-module id="data-table-column-filter">
<style is="custom-style">
:host([hidden]) {
display: none;
}
paper-input {
--paper-input-container: {
margin-bottom: 20px;
};
--paper-input-container-label: {
font-size: inherit;
}
}
</style>
<template>
<paper-input label="[[label]]" value="[[value]]" on-value-changed="_valueChanged"></paper-input>
</template>
<script>
Polymer({
is: 'data-table-column-filter',
properties: {
label: String,
value: {
type: String,
notify: true
},
hidden: Boolean
},
_valueChanged: function(e) {
// store value in a variable, referring to e.detail.value inside the debounce
// function results in weird outcomes. event object might be reused by Polymer?
var value = e.detail.value;
this.debounce('value', function() {
this.value = value;
}.bind(this), 250);
}
});
</script>
</dom-module>