fix: Don't show pin button in input panel when there's binary data (#11267)

This commit is contained in:
Mutasem Aldmour
2024-10-21 15:00:15 +02:00
committed by GitHub
parent fed7c3ec1f
commit c0b5b92f62
2 changed files with 60 additions and 7 deletions

View File

@@ -256,11 +256,19 @@ export default defineComponent({
return this.nodeTypesStore.isTriggerNode(this.node.type);
},
showPinButton(): boolean {
return Boolean(
(this.canPinData || this.pinnedData.hasData.value || !!this.binaryData?.length) &&
(this.rawInputData.length || this.pinnedData.hasData.value) &&
!this.editMode.enabled,
);
if (!this.rawInputData.length && !this.pinnedData.hasData.value) {
return false;
}
if (this.editMode.enabled) {
return false;
}
if (this.binaryData?.length) {
return this.isPaneTypeOutput;
}
return this.canPinData;
},
pinButtonDisabled(): boolean {
return (