diff --git a/next-ui/src/components/book/card/BookCard.vue b/next-ui/src/components/book/card/BookCard.vue index 9a520ede..b4dfdc49 100644 --- a/next-ui/src/components/book/card/BookCard.vue +++ b/next-ui/src/components/book/card/BookCard.vue @@ -12,7 +12,7 @@ :menu-icon="menuIcon" :menu-props="menuProps" v-bind="props" - @selection="(val) => emit('selection', val)" + @selection="(val, event) => emit('selection', val, event)" @click-quick-action="showEditMetadataDialog()" @card-long-press="bottomSheet = true" /> diff --git a/next-ui/src/components/item/CardWide/ItemCardWide.vue b/next-ui/src/components/item/CardWide/ItemCardWide.vue index 2e6d21aa..d85e6a0a 100644 --- a/next-ui/src/components/item/CardWide/ItemCardWide.vue +++ b/next-ui/src/components/item/CardWide/ItemCardWide.vue @@ -8,7 +8,9 @@ v-bind="props" :elevation="isHovering ? 3 : 1" :class="isPreSelect || selected ? 'cursor-pointer' : 'cursor-default'" - @click="isPreSelect || selected ? emit('selection', !selected) : {}" + @click=" + (event: Event) => (isPreSelect || selected ? emit('selection', !selected, event) : {}) + " >
@@ -25,7 +27,7 @@ :variant="selected ? 'text' : 'flat'" class="position-absolute top-0 left-0" style="z-index: 2" - @click.stop="emit('selection', !selected)" + @click.stop="(event: Event) => emit('selection', !selected, event)" /> diff --git a/next-ui/src/components/item/card/ItemCard.vue b/next-ui/src/components/item/card/ItemCard.vue index 39e80bc5..c14aff2a 100644 --- a/next-ui/src/components/item/card/ItemCard.vue +++ b/next-ui/src/components/item/card/ItemCard.vue @@ -11,7 +11,9 @@
diff --git a/next-ui/src/components/series/CardWide/SeriesCardWide.vue b/next-ui/src/components/series/CardWide/SeriesCardWide.vue index c2716a8b..e7569dda 100644 --- a/next-ui/src/components/series/CardWide/SeriesCardWide.vue +++ b/next-ui/src/components/series/CardWide/SeriesCardWide.vue @@ -10,7 +10,7 @@ :menu-icon="menuIcon" :menu-props="menuProps" v-bind="props" - @selection="(val) => emit('selection', val)" + @selection="(val, event) => emit('selection', val, event)" @click-quick-action="showEditMetadataDialog()" @card-long-press="bottomSheet = true" /> diff --git a/next-ui/src/components/series/card/SeriesCard.vue b/next-ui/src/components/series/card/SeriesCard.vue index 3f1e5537..ce1f5839 100644 --- a/next-ui/src/components/series/card/SeriesCard.vue +++ b/next-ui/src/components/series/card/SeriesCard.vue @@ -12,7 +12,7 @@ :menu-icon="menuIcon" :menu-props="menuProps" v-bind="props" - @selection="(val) => emit('selection', val)" + @selection="(val, event) => emit('selection', val, event)" @click-quick-action="showEditMetadataDialog()" @card-long-press="bottomSheet = true" /> diff --git a/next-ui/src/pages/libraries/[id]/series.vue b/next-ui/src/pages/libraries/[id]/series.vue index 18232e73..23ff88a1 100644 --- a/next-ui/src/pages/libraries/[id]/series.vue +++ b/next-ui/src/pages/libraries/[id]/series.vue @@ -54,7 +54,7 @@ > @@ -64,7 +64,7 @@ :selected="isSelected(item)" :pre-select="preSelect" :width="display.xs.value ? undefined : appStore.gridCardWidth" - @selection="toggleSelect(item)" + @selection="(_val, event) => toggleSelect(item, idx, event as MouseEvent)" /> @@ -75,7 +75,7 @@ fluid > @@ -85,7 +85,7 @@ :selected="isSelected(item)" :pre-select="preSelect" :width="appStore.gridCardWidth" - @selection="toggleSelect(item)" + @selection="(_val, event) => toggleSelect(item, idx, event as MouseEvent)" /> diff --git a/next-ui/src/types/ItemCard.ts b/next-ui/src/types/ItemCard.ts index 6941f1fe..d9b14b40 100644 --- a/next-ui/src/types/ItemCard.ts +++ b/next-ui/src/types/ItemCard.ts @@ -26,7 +26,7 @@ export type ItemCardProps = { } export type ItemCardEmits = { - selection: [selected: boolean] + selection: [selected: boolean, event: Event] } export type ItemCardTitle = {