I am getting this error every time I make changes to the text in the input field using the modal component.
Here is my code using the Update document databases API.
const updateTodo = (database_id, collection_id, document_id) =>
databases.updateDocument(database_id, collection_id, document_id);
const handleUpdateTodo = () => {
updateTodo(
props.item.$databaseId,
props.item.$collectionId,
props.item.$id
).then(
function (response) {
console.log(response);
},
function (error) {
console.log("Error updating the document", error.message);
}
);
};
It changes the text, but on refresh, the data doesn't persist both on the browser and in the database.
yoiu're not passing the data to update...
How should I do it?
<form
class="form u-width-full-line u-max-width-500 u-flex u-main-center"
@submit.prevent="handleUpdateTodo">
You're missing the 4th argument to updateDocument()
Hmm.
This is the code. https://gist.github.com/Terieyenike/bfdbfe67a48573b4f0de06558f5033f8
Still, you're missing the 4th argument to updateDocument()
Ok. Where exactly can I fix it on? It is only this part that is still disturbing me.
Line 82...
Got it. Thank you so much.
Recommended threads
- Seed db
hello there... is this correct way to seed appwrite
- Query Appwrite
Hello, I have a question regarding Queries in Appwrite. If I have a string "YYYY-MM", how can I query the $createdAt column to match this filter?
- Different appwrite IDs are getting expos...
File_URL_FORMAT= https://cloud.appwrite.io/v1/storage/buckets/[BUCKET_ID]/files/[FILE_ID]/preview?project=[PROJECT_ID] I'm trying to access files in my web app...