clarify variable name
This commit is contained in:
parent
db6358b0b7
commit
e5f28fede7
2 changed files with 6 additions and 6 deletions
|
@ -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>
|
||||||
|
|
|
@ -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 !== '') {
|
||||||
|
|
Loading…
Reference in a new issue