allow transition between 2 custom modal uses
This commit is contained in:
parent
83a0ef25fe
commit
efe469d4f5
@ -22,6 +22,12 @@ const arrayToHtmlList = (array, bold=false) => {
|
|||||||
const createModal = async (options = {}) => {
|
const createModal = async (options = {}) => {
|
||||||
let $modal = $("#customModal");
|
let $modal = $("#customModal");
|
||||||
|
|
||||||
|
// If transitioning from one modal to another, wait for this one to close
|
||||||
|
if ($modal.is(':visible')) {
|
||||||
|
$modal.modal('hide');
|
||||||
|
await new Promise(resolve => $modal.one('hidden.bs.modal', resolve));
|
||||||
|
}
|
||||||
|
|
||||||
let defaults = {
|
let defaults = {
|
||||||
title: "Modal Title",
|
title: "Modal Title",
|
||||||
texts: [
|
texts: [
|
||||||
|
Loading…
x
Reference in New Issue
Block a user