In testing this using Vue 3 composition api, I am always getting an undefined new tab and the parent id is always there. Any thoughts as to why?
`<script setup lang="ts">
import { onMounted, ref } from 'vue';
import { RouterView } from 'vue-router';
import UniqueTabId from "unique-tabid";
const uniqueTabId = new UniqueTabId("portal");
uniqueTabId.WAIT_TIMEOUT = 2000;
uniqueTabId.uniqIdFunc = generateSessionId;
onMounted(() => {
uniqueTabId.initTab()
})
function generateSessionId() {
const characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
const length = 12;
let randomStr = '';
for (let i = 0; i < length; i++) {
randomStr += characters.charAt(Math.floor(Math.random() * characters.length));
}
return `${ randomStr }`;
}
let text = ref('')
uniqueTabId.tabIdCallback = ({ tabId, isNewTab, parentTabId }) => text.value = `TabId: ${tabId}; New Tab: ${isNewTab}; Duplicated: ${parentTabId !== null ? `Yes. ParentTabId = ${parentTabId}` : "No"}`;
</script>
<style scoped>
</style>
`
In testing this using Vue 3 composition api, I am always getting an undefined new tab and the parent id is always there. Any thoughts as to why?
`<script setup lang="ts">
import { onMounted, ref } from 'vue';
import { RouterView } from 'vue-router';
import UniqueTabId from "unique-tabid";
{{ text }}
`