Skip to content

Commit 99f0267

Browse files
committed
feat(core): modal.open accepts second force argument
1 parent 50224e9 commit 99f0267

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

src/core/components/modal/modal-class.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ class Modal extends Framework7Class {
7777
modal.emit(`local::closed modalClosed ${modal.type}Closed`, modal);
7878
}
7979

80-
open(animateModal) {
80+
open(animateModal, force) {
8181
const modal = this;
8282
const document = getDocument();
8383
const app = modal.app;
@@ -94,7 +94,7 @@ class Modal extends Framework7Class {
9494
if (animateModal === false && $el[0] && type !== 'dialog') {
9595
$el[0].style.display = 'block';
9696
}
97-
return modal;
97+
if (!force) return modal;
9898
}
9999

100100
if (type === 'dialog' && app.params.modal.queueDialogs) {

src/react/components/popup.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ const Popup = forwardRef((props, ref) => {
139139
f7Popup.current = f7.popup.create(popupParams);
140140
modalEvents('on');
141141
if (opened) {
142-
f7Popup.current.open(false);
142+
f7Popup.current.open(false, true);
143143
}
144144
});
145145
};

src/svelte/components/popup.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@
125125
f7ready(() => {
126126
f7Popup = app.f7.popup.create(popupParams);
127127
if (opened) {
128-
f7Popup.open(false);
128+
f7Popup.open(false, true);
129129
}
130130
});
131131
});

src/vue/components/popup.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ export default {
151151
f7ready(() => {
152152
f7Popup.value = f7.popup.create(popupParams);
153153
if (props.opened) {
154-
f7Popup.value.open(false);
154+
f7Popup.value.open(false, true);
155155
}
156156
});
157157
});

0 commit comments

Comments
 (0)