Fix virtual scrolling for tree threading

Ref: tree-threading
This commit is contained in:
Tusooa Zhu 2021-09-15 23:35:17 -04:00
parent 0db5a5a581
commit 2a510205c3
No known key found for this signature in database
GPG key ID: 7B467EDE43A08224
3 changed files with 18 additions and 6 deletions

View file

@ -48,6 +48,13 @@ const ThreadTree = {
dive: Function
},
computed: {
suspendable () {
const selfSuspendable = this.$refs.statusComponent ? this.$refs.statusComponent.suspendable : true
if (this.$refs.childComponent) {
return selfSuspendable && this.$refs.childComponent.every(s => s.suspendable)
}
return selfSuspendable
},
reverseLookupTable () {
return this.conversation.reduce((table, status, index) => {
table[status.id] = index