Skip to content

Commit

Permalink
Add handling remove word from List view
Browse files Browse the repository at this point in the history
  • Loading branch information
pasikonik committed Mar 17, 2023
1 parent 0a560b7 commit 18c8a33
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions src/components/WordListing.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { useWordStore } from '@/stores/word'
defineProps<{ words: Word[] }>()
const wordStore = useWordStore()
const store = useWordStore()
let itemsPerPage = ref(100)
const headers = [
Expand All @@ -27,10 +27,6 @@ function getProgressColor(proficiency: number) {
else if (proficiency >= 25) return 'amber'
else return 'grey-lighten-2'
}
function removeWord(wordId: number) {
wordStore.deleteWord(wordId)
}
</script>

<template>
Expand All @@ -56,7 +52,7 @@ function removeWord(wordId: number) {
class="action"
size="small"
icon="mdi-trash-can-outline"
@click="removeWord(item.raw.id)"
@click="store.deleteWord(item.raw.id)"
/>
</template>
</v-data-table>
Expand All @@ -71,7 +67,7 @@ function removeWord(wordId: number) {
tr:hover {
i.action {
opacity: 1;
transition: all 0.6s ease 0.5s;
transition: opacity 0.6s ease 0.3s;
&:hover {
color: #ef5350;
Expand Down

0 comments on commit 18c8a33

Please sign in to comment.