Skip to content

Commit a24efd5

Browse files
authored
Fixed tagFilterer to correctly bootstrap and work (#1510)
tf-tag-filterer, correctly, defined its property `tag-filter` as readOnly and this broke the data connection between `paper-input`. Between the paper-input and the filterer, there should be a two-way binding of its value whereas all the consumers of the tf-tag-filterer should only read from the component. Now, using the private property, `_tagFilter`, we establish the two-way binding while the public property is only used to publish the change. Note: bug was introduced over #1483, #1475, and #1493.
1 parent fc7ed6a commit a24efd5

File tree

1 file changed

+19
-6
lines changed

1 file changed

+19
-6
lines changed

tensorboard/components/tf_categorization_utils/tf-tag-filterer.html

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
<template>
3030
<paper-input no-label-float
3131
label="Filter tags (regular expressions supported)"
32-
value="{{tagFilter}}"
32+
value="{{_tagFilter}}"
3333
class="search-input">
3434
<iron-icon prefix icon="search" slot="prefix"></iron-icon>
3535
</paper-input>
@@ -48,15 +48,28 @@
4848
tagFilter: {
4949
type: String,
5050
notify: true,
51-
readOnly: true,
52-
value: tf_storage.getStringInitializer('tagFilter',
53-
{defaultValue: '', useLocalStorage: false}),
51+
computed: '_computeTagFilter(_tagFilter)',
52+
},
53+
_tagFilter: {
54+
type: String,
55+
value: tf_storage.getStringInitializer('tagFilter', {
56+
defaultValue: '',
57+
useLocalStorage: false,
58+
polymerProperty: '_tagFilter',
59+
}),
5460
observer: '_tagFilterObserver',
5561
},
5662
},
5763

58-
_tagFilterObserver: tf_storage.getStringObserver(
59-
'tagFilter', {defaultValue: '', useLocalStorage: false}),
64+
_tagFilterObserver: tf_storage.getStringObserver('tagFilter', {
65+
defaultValue: '',
66+
useLocalStorage: false,
67+
polymerProperty: '_tagFilter',
68+
}),
69+
70+
_computeTagFilter() {
71+
return this._tagFilter;
72+
},
6073
});
6174
</script>
6275
</dom-module>

0 commit comments

Comments
 (0)