From e4ff391b1a4be1252c06c424b48b8b4a6612e392 Mon Sep 17 00:00:00 2001 From: Johannes Meyer Date: Thu, 25 Feb 2021 11:27:05 +0100 Subject: [PATCH] js: Trigger a `rendered` event if SearchBar editor is opened --- public/js/icinga/behavior/input-enrichment.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/public/js/icinga/behavior/input-enrichment.js b/public/js/icinga/behavior/input-enrichment.js index 4d6cfe1b2..85992185f 100644 --- a/public/js/icinga/behavior/input-enrichment.js +++ b/public/js/icinga/behavior/input-enrichment.js @@ -3,7 +3,7 @@ /** * InputEnrichment - Behavior for forms with enriched inputs */ -(function(Icinga) { +(function(Icinga, $) { "use strict"; @@ -32,8 +32,9 @@ /** * Listen for events emitted by the SearchBar widget */ - this.on('editor-open', '.container', function () { + this.on('editor-open', '.container', function (event) { this.dataset.suspendAutorefresh = ''; + $(event.target.dataset.searchEditor).trigger('rendered', [false, true]); }); this.on('editor-close', '.container', function () { delete this.dataset.suspendAutorefresh; @@ -151,4 +152,4 @@ Icinga.Behaviors.InputEnrichment = InputEnrichment; -})(Icinga); +})(Icinga, jQuery);