From 6626e5bf2451cffed6ead2a0617f2ca947f4eecb Mon Sep 17 00:00:00 2001 From: mokaddem Date: Fri, 27 Mar 2020 16:04:26 +0100 Subject: [PATCH] fix: [attribute:edit] Create chosen picker when modal is shown --- app/View/Attributes/add.ctp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/View/Attributes/add.ctp b/app/View/Attributes/add.ctp index a9d06238b..43dc78570 100644 --- a/app/View/Attributes/add.ctp +++ b/app/View/Attributes/add.ctp @@ -172,10 +172,10 @@ $('#AttributeType').chosen(); $('#AttributeCategory').chosen(); - setTimeout(function() { // make sure html is draw. TODO: use modal event to draw it + $('#genericModal').on('shown', function() { $('#AttributeType').chosen(); $('#AttributeCategory').chosen(); - }, 500); + }) });