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="(p) => papers = p"
|
||||
:filterValue="search.value"
|
||||
:paperQuery="search"
|
||||
:paperFilter="paperFilter"
|
||||
/>
|
||||
</main>
|
||||
|
|
|
@ -25,16 +25,16 @@ export default {
|
|||
}
|
||||
},
|
||||
props: {
|
||||
filterValue: String,
|
||||
paperFilter: Array,
|
||||
paperQuery: Object,
|
||||
paperFilter: Object,
|
||||
},
|
||||
computed: {
|
||||
filteredData() {
|
||||
const filterValue: String = this.filterValue
|
||||
const paperQuery: String = this.paperQuery?.value
|
||||
let filteredPapers: Papers[] = this.papers
|
||||
if (filterValue !== '') {
|
||||
if (paperQuery !== '') {
|
||||
filteredPapers = this.papers.filter((paper) => {
|
||||
return paper.name.toLowerCase().includes(filterValue.toLowerCase())
|
||||
return paper.name.toLowerCase().includes(paperQuery.toLowerCase())
|
||||
})
|
||||
}
|
||||
if (this.paperFilter?.type !== '') {
|
||||
|
|
Loading…
Reference in a new issue