Polyfills sticky position within a watcher
This commit is contained in:
parent
00c7d78d49
commit
26e88b10ad
|
@ -100,6 +100,14 @@ export default {
|
||||||
if (_.isEmpty(oldVal) && !_.isEmpty(newVal.pipeline)) {
|
if (_.isEmpty(oldVal) && !_.isEmpty(newVal.pipeline)) {
|
||||||
this.fetchStages();
|
this.fetchStages();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (newVal.archived) {
|
||||||
|
this.$nextTick(() => {
|
||||||
|
if (this.$refs.sticky) {
|
||||||
|
polyfillSticky(this.$refs.sticky);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
|
@ -117,24 +125,13 @@ export default {
|
||||||
window.addEventListener('resize', this.onResize);
|
window.addEventListener('resize', this.onResize);
|
||||||
window.addEventListener('scroll', this.updateScroll);
|
window.addEventListener('scroll', this.updateScroll);
|
||||||
},
|
},
|
||||||
|
|
||||||
mounted() {
|
mounted() {
|
||||||
this.updateSidebar();
|
this.updateSidebar();
|
||||||
},
|
},
|
||||||
|
|
||||||
updated() {
|
|
||||||
this.$nextTick(() => {
|
|
||||||
if (this.$refs.sticky) {
|
|
||||||
polyfillSticky(this.$refs.sticky);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
destroyed() {
|
destroyed() {
|
||||||
window.removeEventListener('resize', this.onResize);
|
window.removeEventListener('resize', this.onResize);
|
||||||
window.removeEventListener('scroll', this.updateScroll);
|
window.removeEventListener('scroll', this.updateScroll);
|
||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
...mapActions([
|
...mapActions([
|
||||||
'setJobEndpoint',
|
'setJobEndpoint',
|
||||||
|
|
Loading…
Reference in New Issue