🐛 Fix UI blocking with large workflows (#2053)

* fix reactivity bug

* Clean up props

* add comma

* clean up, reduce reactivity more

* ts issues
This commit is contained in:
Mutasem Aldmour 2021-08-07 09:35:59 +02:00 committed by GitHub
parent af230c704d
commit fa31c0c7b6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 15 additions and 5 deletions

View file

@ -125,22 +125,30 @@ export default mixins(externalHooks, nodeBase, nodeHelpers, workflowHelpers).ext
return 'play';
}
},
nodeSubtitle (): string | undefined {
return this.getNodeSubtitle(this.data, this.nodeType, this.workflow);
},
workflowRunning (): boolean {
return this.$store.getters.isActionActive('workflowRunning');
},
workflow () {
return this.getWorkflow();
},
watch: {
isActive(newValue, oldValue) {
if (!newValue && oldValue) {
this.setSubtitle();
}
},
},
mounted() {
this.setSubtitle();
},
data () {
return {
isTouchActive: false,
nodeSubtitle: '',
};
},
methods: {
setSubtitle() {
this.nodeSubtitle = this.getNodeSubtitle(this.data, this.nodeType, this.getWorkflow()) || '';
},
disableNode () {
this.disableNodes([this.data]);
},

View file

@ -57,6 +57,7 @@ export const nodeBase = mixins(
'nodeId',
'instance',
'isReadOnly',
'isActive',
],
methods: {
__addNode (node: INodeUi) {

View file

@ -26,6 +26,7 @@
:name="nodeData.name"
:isReadOnly="isReadOnly"
:instance="instance"
:isActive="!!activeNode && activeNode.name === nodeData.name"
></node>
</div>
</div>