bhaveshpatel200 / vue3-datatable

vue3-datatable is a powerful component for creating dynamic and customizable data tables. It supports large amounts of data, sorting, pagination, and filtering and highly customizable
MIT License
134 stars 19 forks source link

NuxtLink with target blank #38

Closed Thav0 closed 1 month ago

Thav0 commented 5 months ago

Hi,

When I try to use with target="_blank" the NuxtLink doesn't work

` <vue3-datatable :rows="salesReport" :columns="cols" :loading="loading" :totalRows="paginationParams.totalItems" :isServerMode="true" :pageSize="paginationParams.perPage" :pageSizeOptions="[50, 100, 200, 300]" :currentPage="paginationParams.currentPage" :columnFilter="true" @change="updateSalesReportData" class="text-xs"

<template #id="data">

{{ data.value.id }}

` Only without target="_blank" works, but on this case I want to open a new tab. The NuxtLink outside the vue3-datatable works with the target="_blank". I think there is something wrong inside the component.

bhaveshpatel200 commented 5 months ago

Ok, I will check and updates you.

Thav0 commented 4 months ago

Any new about this issue?

bhaveshpatel200 commented 1 month ago

Hi, You can use @click.stop to prevent the parent click event, which will work. I will also update it in all our demos.

<NuxtLink class="text-blue-600 underline" :to="'https://google.com'" target="_blank" @click.stop> Google.com </NuxtLink>