From eeff1cedbcf7ef8dd5ef637fb3b1394c0386f397 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?V=C3=A1clav=20Barto=C5=A1?= <bartos@cesnet.cz>
Date: Tue, 13 Apr 2021 15:11:54 +0200
Subject: [PATCH] TheHiveButton: don't open empty observable lists, increase
 version

---
 thehive_button/package.json             | 2 +-
 thehive_button/public/vis_controller.js | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/thehive_button/package.json b/thehive_button/package.json
index 6ece198..c9cd952 100644
--- a/thehive_button/package.json
+++ b/thehive_button/package.json
@@ -1,6 +1,6 @@
 {
   "name": "thehive_button",
-  "version": "1.0.0",
+  "version": "1.1.0",
   "description": "Visualisation plugin which creates a simple button to create a new case in The Hive.",
   "main": "index.js",
   "kibana": {
diff --git a/thehive_button/public/vis_controller.js b/thehive_button/public/vis_controller.js
index 7b3ee14..62682f6 100644
--- a/thehive_button/public/vis_controller.js
+++ b/thehive_button/public/vis_controller.js
@@ -512,7 +512,7 @@ class ObservablesTable extends Component {
         <EuiAccordion
           id="accordion-{this.props.fieldName}"
           buttonContent={<EuiTitle size="xs"><h4>{this.props.fieldName.replace(/\.keyword$/, "")} ({this.props.obsSel.length}/{n_obs})</h4></EuiTitle>}
-          initialIsOpen={n_obs <= 3}
+          initialIsOpen={n_obs > 0 && n_obs <= 3}
         >
           <EuiBasicTable
             ref={this.tableRef}
-- 
GitLab