ArnabChatterjee20k|Mentor
I am trying to debounce the update method. Here is the code
TypeScript
reOrderCol() {
const recentColumn = { current: [] };
const update = this.db.updateDocument
const dbId = this.dbId
const boardsId = this.boardsId
async function reOrderColDriver(board_db_id, newOrder) {
debugger
recentColumn.current = newOrder;
setTimeout(async () => {
console.log(update);
if (recentColumn.current.length !== 0) {
console.log("🚀 ~ file: API.js:134 ~ API ~ reOrderCol ~ dbId:", dbId,boardsId)
const res = await update(
dbId,
boardsId,
board_db_id,
{
order: newOrder,
}
);
console.log({ res });
}
}, 200);
}
return reOrderColDriver
}
}
TL;DR
The code is causing a `TypeError` because it is trying to read the property `client` of an undefined object. The `client` property is not present in the code provided. The code is attempting to debounce the `update` method. There is no solution provided in the thread. Binyamin
I don't see any client
in this code
Binyamin
It's in the update
function?
Recommended threads
- Update User Error
```ts const { users, databases } = await createAdminClient(); const session = await getLoggedInUser(); const user = await users.get(session.$id); if (!use...
- apple exchange code to token
hello guys, im new here 🙂 I have created a project and enabled apple oauth, filled all data (client id, key id, p8 file itself etc). I generate oauth code form...
- How to Avoid Double Requests in function...
I'm currently using Appwrite's `functions.createExecution` in my project. I want to avoid double requests when multiple actions (like searching or pagination) a...