Skip to content

Commit

Permalink
AHH
Browse files Browse the repository at this point in the history
  • Loading branch information
philwing100 committed Dec 5, 2024
1 parent ab74308 commit 10f8d0a
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
5 changes: 2 additions & 3 deletions src/components/ListItems/ListElement.css
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
}

.dropdown {
position: relative;
position: relative;
display: inline-block;
width: 100%;
}
Expand Down Expand Up @@ -97,8 +97,7 @@
.ListContainer {
display: flex;
flex-direction: column;
min-height: 60%;
max-height: 64%;
max-height:80%;
max-width: 100%;
overflow-y:auto;
flex:1;
Expand Down
19 changes: 9 additions & 10 deletions src/components/ListItems/ListElement.vue
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ export default {
},
methods: {
saveEditableText(index, event) {
let newText = event.target.innerText;
/*let newText = event.target.innerText;
//Limit text length to 500 chars as validation
Expand All @@ -149,10 +149,10 @@ export default {
sel.removeAllRanges();
sel.addRange(range);
this.saveList();
this.saveList();*/
},
completeItem(index) {
if (this.itemsArray[index].textString != '') {
if (this.itemsArray[index].textString != null && this.itemsArray[index].textString != '') {
this.completedItemsArray.push(this.itemsArray[index]);
}
this.removeItemByIndex(index);
Expand Down Expand Up @@ -196,7 +196,7 @@ export default {
},
loadDefaultItemValues() {
//future makes api call to get this user's default values
},
createNewItem(text) {
return {
Expand All @@ -214,7 +214,6 @@ export default {
},
createItemWithExistingValues(text) {
return {
//Will be replaced eventually
textString: text,
scheduledCheckbox: this.scheduledCheckbox,
Expand Down Expand Up @@ -378,12 +377,12 @@ export default {
this.$nextTick(() => {
this.focusEditable(newIndex);
this.itemsArray.splice(index, 1);
if (this.itemsArray.length === 0) {
this.itemsArray.push(this.createNewItem('')); // Add an empty item as a base case
this.saveList();
}
});
this.itemsArray.splice(index, 1);
if (this.itemsArray.length === 0) {
this.itemsArray.push(this.createNewItem('')); // Add an empty item as a base case
}
this.saveList();
}
},
setCaretPosition(element, position) {
Expand Down
2 changes: 2 additions & 0 deletions src/views/Dashboard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
<ListElement listName="Daily List"/>
</div>
</div>

</div>
</template>

Expand Down Expand Up @@ -46,6 +47,7 @@ export default {
},
methods: {
handleTaskUpdates(updatedTasks, listName) {
},
handleTaskClicked(taskData) {
Expand Down

0 comments on commit 10f8d0a

Please sign in to comment.