From 0ea6f1e270aabf75227129068885d4e61bb3d44c Mon Sep 17 00:00:00 2001 From: Soufiane Fariss Date: Wed, 31 Jul 2024 00:55:18 +0200 Subject: [PATCH] fix: do not toggle/on feature and statements --- webui/src/components/RuleMatchesTable.vue | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/webui/src/components/RuleMatchesTable.vue b/webui/src/components/RuleMatchesTable.vue index 058a5527..c5fa505e 100644 --- a/webui/src/components/RuleMatchesTable.vue +++ b/webui/src/components/RuleMatchesTable.vue @@ -12,8 +12,7 @@ :rowHover="true" :indentation="1.3" selectionMode="single" - @nodeExpand="onNodeSelect" - @nodeSelect="onNodeSelect" + @node-select="onNodeSelect" :pt="{ row: ({ instance }) => ({ oncontextmenu: (event) => onRightClick(event, instance) @@ -199,6 +198,9 @@ const onNodeSelect = (node) => { const nodeKey = node.key const nodeType = node.data.type + // We only expand rule and match locations, if not return + if (nodeType !== 'rule' && nodeType !== 'match location') return + // If the node is already expanded, collapse it and its children if (expandedKeys.value[nodeKey]) { delete expandedKeys.value[nodeKey]