I have also manipulated the edit task code you can revert back to use your code. this.editTask(oneTask.text, oneTask.key)} Task: items.filter(item => item.key != key),Ĭonst currentTaskArray = Ĭonst taskAfterDeleted = currentTaskArray.filter( In my understanding, you are trying to access the text so it will be oneTask.text. ![]() The edit button is not working because you are using which doesn't exist. This.handleInput = (this) Ĭonst items = Ĭonst currentTaskArray = Ĭonst taskAfterDeleted = currentTaskArray.filter(deletedTask => deletedTask.key != key) I have some css issue with button alignments too. For my edit I take list item string and place it in the input used for add and if I press add again my list item change. ![]() We create a form with onSubmit set to submit so that the function gets called when the user submits the form. With add,delete, drag&drop and edit functions. It will also reset task which as a result clears the input. ![]() It will use addTask to add the task to our context. Then I can edit and when I enter, it should be updated. Here we create a submit function that will be called when the user clicks the 'Add' button. When I click on the edit button, I want the text box to be editable. I am having a hard time with Edit button. Delete button is working fine, but not the edit button. ![]() I am new to React.js and trying to create a TODO list.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |