Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found

Submitted

Job Listings [HTML, SASS, JS]

@florinpavel22

Desktop design screenshot for the Job listings with filtering coding challenge

This is a solution for...

  • HTML
  • CSS
  • JS
3intermediate
View challenge

Design comparison


SolutionDesign

Solution retrospective


I haven't figured a way to make the tags filter work properly, at the minute you can filter the jobs only by one tag. If anyone can help I'd appreciate it.

Community feedback

@tydusgg

Posted

I have an idea how to realize multiple filter.

let arr = [
  {
    // some stuff
    skills: ["JavaScript", "HTML", ......]
  },
  {.......}
];
let filter = ["HTML" "CSS"];

function filterArray(arr, filter){
  return arr.filter( item => filter.every(field => item.skills.includes(field) ) )
};

And i think you might render array items in JS, not in static HTML.

Good luck :3

0

@florinpavel22

Posted

@tydusgg Hi, could you explain a bit more in depth how it should work? Like the idea behind it?

0

@tydusgg

Posted

@florinpavel22 You have an array of jobs as objects, they contain skills array. If filter is empty, then function returns all items, if filter contains atleast one field, then function returns filtered array.

My function needs to be expanded a bit, but idea is something like this.

0

Please log in to post a comment

Log in with GitHub
Discord logo

Join 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