Skip to content

Commit 0918aec

Browse files
fix(cypher): run any cypher field
1 parent 32f864c commit 0918aec

File tree

1 file changed

+19
-17
lines changed

1 file changed

+19
-17
lines changed

src/neo4j-arc/common/components/PropertiesTable/PropertiesTable.tsx

Lines changed: 19 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -108,23 +108,25 @@ export const PropertiesTable = ({
108108
textToCopy={`${key}: ${value}`}
109109
iconSize={12}
110110
/>
111-
{key === 'cypher' && executeCypher && value && (
112-
<CypherExecDiv>
113-
<button
114-
title={'Execute cypher'}
115-
onClick={() => {
116-
if (executeCypher && value) {
117-
executeCypher(value)
118-
}
119-
}}
120-
>
121-
<i
122-
className="fa fa-external-link"
123-
aria-hidden="true"
124-
></i>
125-
</button>
126-
</CypherExecDiv>
127-
)}
111+
{key.toLowerCase().includes('cypher') &&
112+
executeCypher &&
113+
value && (
114+
<CypherExecDiv>
115+
<button
116+
title={'Execute cypher'}
117+
onClick={() => {
118+
if (executeCypher && value) {
119+
executeCypher(value)
120+
}
121+
}}
122+
>
123+
<i
124+
className="fa fa-external-link"
125+
aria-hidden="true"
126+
></i>
127+
</button>
128+
</CypherExecDiv>
129+
)}
128130
</td>
129131
</tr>
130132
))}

0 commit comments

Comments
 (0)