Skip to content

Commit

Permalink
Pushing new bundle
Browse files Browse the repository at this point in the history
  • Loading branch information
morkro committed Jan 25, 2022
1 parent 2bd05b6 commit d89b918
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 12 deletions.
17 changes: 7 additions & 10 deletions dist/vue-a11y-dialog.esm.js
Original file line number Diff line number Diff line change
Expand Up @@ -178,13 +178,10 @@ const _sfc_main = {
type: String,
required: true
},
appRoot: {
type: String,
required: true
},
dialogRoot: {
type: String,
required: true
default: "body",
required: false
},
classNames: {
type: Object,
Expand Down Expand Up @@ -223,12 +220,12 @@ const _sfc_main = {
}
}
},
emits: ["dialogRef"],
emits: ["dialog-ref"],
setup(props, { emit }) {
let dialog;
const rootElement = ref(null);
const portalTarget = computed(() => {
return props.dialogRoot || props.appRoot;
return props.dialogRoot || "body";
});
const fullTitleId = computed(() => {
return props.titleId || `${props.id}-title`;
Expand All @@ -238,8 +235,8 @@ const _sfc_main = {
});
const instantiateDialog = async () => {
await nextTick();
dialog = new A11yDialog$1(rootElement.value, portalTarget.value || props.appRoot);
emit("dialogRef", dialog);
dialog = new A11yDialog$1(rootElement.value);
emit("dialog-ref", dialog);
};
onMounted(() => {
instantiateDialog();
Expand All @@ -251,7 +248,7 @@ const _sfc_main = {
if (dialog) {
dialog.destroy();
}
emit("dialogRef");
emit("dialog-ref");
});
return {
dialog,
Expand Down
2 changes: 1 addition & 1 deletion dist/vue-a11y-dialog.umd.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion src/Demo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@
}
},
assignDialogRef(dialog) {
console.log('ref', dialog)
this.dialog = dialog
},
// Tests using alertdialog role and opening modal
Expand Down

0 comments on commit d89b918

Please sign in to comment.