-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathbrainy-table-column-filter.html
More file actions
executable file
·46 lines (40 loc) · 1.08 KB
/
brainy-table-column-filter.html
File metadata and controls
executable file
·46 lines (40 loc) · 1.08 KB
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
<link rel="import" href="../paper-input/paper-input.html">
<dom-module id="brainy-table-column-filter">
<style>
:host {
--paper-input-container-label: {
font-size: inherit;
}
}
:host([hidden]) {
display: none;
}
</style>
<template>
<paper-input label="[[label]]" no-label-float value="[[value]]" on-value-changed="_valueChanged"></paper-input>
</template>
<script>
(function() {
'use strict';
Polymer({
is: 'brainy-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>