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
- Weird permission failure
when creating an account I use following methods: ``` Future<void> register(String email, String password, String username) async { final user = await accoun...
- Paused project can't activate
I have failed to reactivate one my projects which had been paused
- Site deployment keeps getting failed
Hi good folks, need a hand with Sites deploy Error on every deploy: Synchronous function execution timed out... duration doesn't exceed 30 seconds [exact log ...