Skip to content

Commit

Permalink
Project Click Populate Subtopic
Browse files Browse the repository at this point in the history
- When you click on a project div it will now also change the input dropdown to match the subtopic of what was selected
  • Loading branch information
programmingKyle committed Mar 18, 2024
1 parent 4bdcb3d commit c9b42cf
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/recentProjects.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,18 +29,16 @@ async function populateRecentProjects(){
projectItem_el.append(projectName_el, projectTimeText_el, projectTopicText_el, projectSubtopicText_el);

projectListDiv_el.append(projectItem_el);

projectEventListener(projectItem_el, element.topicID, element.subtopicID, element.project);
}
}

function projectEventListener(div, topicID, subtopicID, project){
div.addEventListener('click', () => {
console.log(subtopicSelect_el);
topicSelect_el.value = topicID;
populateSubtopicSelect(topicID);
subtopicSelect_el.value = subtopicID;
projectInput_el.value = project;
console.log(topicID, subtopicID, project);
});
}

Expand Down

0 comments on commit c9b42cf

Please sign in to comment.