From 5a3c0b2fdc02718fcdda230c9595827d47efdb0d Mon Sep 17 00:00:00 2001 From: Allan Jardine Date: Wed, 12 Dec 2018 11:29:53 +0000 Subject: [PATCH] SearchPane: Remove an existing panel if there is one when rebuilding a pane --- features/searchPane/dataTables.searchPane.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/features/searchPane/dataTables.searchPane.js b/features/searchPane/dataTables.searchPane.js index 347e659..0e578fd 100644 --- a/features/searchPane/dataTables.searchPane.js +++ b/features/searchPane/dataTables.searchPane.js @@ -154,6 +154,16 @@ // Don't show the pane if there isn't enough variance in the data if (this._variance(bins) < this.c.threshold) { + this + .dom + .container + .children() + .map(function() { + if ($(this).data('column') == idx) { + return this; + } + }) + .remove(); return; }