MCPcopy Create free account
hub / github.com/Vishal-raj-1/Awesome-JavaScript-Projects / updateDOM

Function updateDOM

assets/js/DragToDo.js:73–105  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

71
72// Update Columns in DOM - Reset HTML, Filter Array, Update localStorage
73function updateDOM() {
74 // Check localStorage once
75 if (!updatedOnLoad) {
76 getSavedColumns();
77 }
78 // Backlog Column
79 backlogListEl.textContent = '';
80 backlogListArray.forEach((backlogItem, index) => {
81 createItemEl(backlogListEl, 0, backlogItem, index);
82 });
83 backlogListArray = filterArray(backlogListArray);
84 // Progress Column
85 progressListEl.textContent = '';
86 progressListArray.forEach((progressItem, index) => {
87 createItemEl(progressListEl, 1, progressItem, index);
88 });
89 progressListArray = filterArray(progressListArray);
90 // Complete Column
91 completeListEl.textContent = '';
92 completeListArray.forEach((completeItem, index) => {
93 createItemEl(completeListEl, 2, completeItem, index);
94 });
95 completeListArray = filterArray(completeListArray);
96 // On Hold Column
97 onHoldListEl.textContent = '';
98 onHoldListArray.forEach((onHoldItem, index) => {
99 createItemEl(onHoldListEl, 3, onHoldItem, index);
100 });
101 onHoldListArray = filterArray(onHoldListArray);
102 // Don't run more than once, Update Local Storage
103 updatedOnLoad = true;
104 updateSavedColumns();
105}
106
107// Update Item - Delete if necessary, or update Array value
108function updateItem(id, column) {

Callers 8

updateItemFunction · 0.70
addToColumnFunction · 0.70
rebuildArraysFunction · 0.70
DragToDo.jsFile · 0.70
clearBacklogFunction · 0.70
clearInProgressFunction · 0.70
clearCompleteFunction · 0.70
clearOnHoldFunction · 0.70

Calls 4

getSavedColumnsFunction · 0.85
createItemElFunction · 0.85
filterArrayFunction · 0.85
updateSavedColumnsFunction · 0.85

Tested by

no test coverage detected