Skip to content

Commit

Permalink
feat(core): modal.open accepts second force argument
Browse files Browse the repository at this point in the history
  • Loading branch information
nolimits4web committed Oct 31, 2022
1 parent 50224e9 commit 99f0267
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/core/components/modal/modal-class.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ class Modal extends Framework7Class {
modal.emit(`local::closed modalClosed ${modal.type}Closed`, modal);
}

open(animateModal) {
open(animateModal, force) {
const modal = this;
const document = getDocument();
const app = modal.app;
Expand All @@ -94,7 +94,7 @@ class Modal extends Framework7Class {
if (animateModal === false && $el[0] && type !== 'dialog') {
$el[0].style.display = 'block';
}
return modal;
if (!force) return modal;
}

if (type === 'dialog' && app.params.modal.queueDialogs) {
Expand Down
2 changes: 1 addition & 1 deletion src/react/components/popup.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ const Popup = forwardRef((props, ref) => {
f7Popup.current = f7.popup.create(popupParams);
modalEvents('on');
if (opened) {
f7Popup.current.open(false);
f7Popup.current.open(false, true);
}
});
};
Expand Down
2 changes: 1 addition & 1 deletion src/svelte/components/popup.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@
f7ready(() => {
f7Popup = app.f7.popup.create(popupParams);
if (opened) {
f7Popup.open(false);
f7Popup.open(false, true);
}
});
});
Expand Down
2 changes: 1 addition & 1 deletion src/vue/components/popup.vue
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ export default {
f7ready(() => {
f7Popup.value = f7.popup.create(popupParams);
if (props.opened) {
f7Popup.value.open(false);
f7Popup.value.open(false, true);
}
});
});
Expand Down

0 comments on commit 99f0267

Please sign in to comment.