Design comparison
Community feedback
- @Captressketh001Posted about 2 years ago
Weldone @Asieef.
I have a comment on the solution. Before adding a tag into the filter, you can do a check to know if the tag is already in the array before adding pushing a new one into it. I noticed I can add a tag more than once in your solution. Adding a if-else conditional in your jobFilter Method will solve it. I wrote this, it may help.
jobFilter(tag){ if (this.clips.includes(tag)){ (this.showBar = true), (this.tag = tag); }else{ this.clips.push(tag); (this.showBar = true), (this.tag = tag); this.jobs = this.jobs.filter((job) => { return job.tags.includes(tag); }); } }
Marked as helpful0@AsieefPosted about 2 years ago@Captressketh001 Thank you for the feedback, really appreciate it.
0
Please log in to post a comment
Log in with GitHubJoin our Discord community
Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!
Join our Discord