MarcelHarabagiu / Todo-list

create elements in a todo list
0 stars 0 forks source link

dropdown list should be dynamic #10

Open HelloMihai opened 3 years ago

HelloMihai commented 3 years ago

populate the index.html dropdown list from an array you create in app.js

this should not be hardcoded in html file https://github.com/MarcelHarabagiu/Todo-list/blob/455056cccdde017e51ac5e47f3df53b5a10739e9/index.html#L27-L29

MarcelHarabagiu commented 3 years ago

A new Dropdown Options list was created building an array with objects. The sorting is based on the value of a property every object has

https://github.com/MarcelHarabagiu/Todo-list/blob/b82b3ed6b816b40375b0086c1e2f9198c5aae5a0/app.js#L7-L25 and https://github.com/MarcelHarabagiu/Todo-list/blob/b82b3ed6b816b40375b0086c1e2f9198c5aae5a0/app.js#L69-L73