Add data-node-name to node item (#1329)

* Add data-node-name to node item

* Restore n8n-nodes-base prefix for consistency
This commit is contained in:
Iván Ovejero 2021-01-13 05:02:10 -03:00 committed by GitHub
parent 46fb9c09ab
commit 6759e2e72a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,5 +1,5 @@
<template>
<div class="node-item clickable" :class="{active: active}" @click="nodeTypeSelected(nodeType)">
<div class="node-item clickable" :class="{active: active}" :data-node-name="nodeName" @click="nodeTypeSelected(nodeType)">
<NodeIcon class="node-icon" :nodeType="nodeType" :style="nodeIconStyle" />
<div class="name">
{{nodeType.displayName}}
@ -33,6 +33,9 @@ export default Vue.extend({
color: this.nodeType.defaults.color,
};
},
nodeName (): string {
return this.nodeType.name;
},
},
methods: {
nodeTypeSelected (nodeType: INodeTypeDescription) {