clarify variable name

This commit is contained in:
Vri 🌈 2023-06-16 15:23:23 +02:00
parent db6358b0b7
commit e5f28fede7
Signed by: vrifox
GPG key ID: D40098E5B60B2197
2 changed files with 6 additions and 6 deletions

View file

@ -50,7 +50,7 @@ export default {
/> />
<Papers <Papers
@papers="(p) => papers = p" @papers="(p) => papers = p"
:filterValue="search.value" :paperQuery="search"
:paperFilter="paperFilter" :paperFilter="paperFilter"
/> />
</main> </main>

View file

@ -25,16 +25,16 @@ export default {
} }
}, },
props: { props: {
filterValue: String, paperQuery: Object,
paperFilter: Array, paperFilter: Object,
}, },
computed: { computed: {
filteredData() { filteredData() {
const filterValue: String = this.filterValue const paperQuery: String = this.paperQuery?.value
let filteredPapers: Papers[] = this.papers let filteredPapers: Papers[] = this.papers
if (filterValue !== '') { if (paperQuery !== '') {
filteredPapers = this.papers.filter((paper) => { filteredPapers = this.papers.filter((paper) => {
return paper.name.toLowerCase().includes(filterValue.toLowerCase()) return paper.name.toLowerCase().includes(paperQuery.toLowerCase())
}) })
} }
if (this.paperFilter?.type !== '') { if (this.paperFilter?.type !== '') {