Updating value of a dropdown cell

Tags: #<Tag:0x00007efc605cd740>

Hello,

I would like to update a value of a dropdown cell when the cursor moves out of the row being changed for example by moving up or down or clicking outside. I am using the afterDrawSelection hook to know if the focus has moved from the row being changed. However, when I update a dropdown cell and move the focus to other row, the afterDrawSelection gets fired first before the afterChange hook. I have put the call to update the row in the afterDrawSelection, the problem is, since the afterDrawSelection gets fired before afterChange, the change is not being picked up right away, I needed to click somewhere else first.

The reason I put the call to update in the afterDrawSelection is because we are trying to update one whole row, not just 1 cell, so every afterChange, we put the changes in a temporary array, and when the focus moves out, the afterDrawSelection will call the backend update using the array of changes gathered from afterChange hook.

Let me know if something isn’t clear.

Hi @eabardies

I think that we already followed this topic here afterChange and afterDrawSelection hook

Let me know if you need anything more than that.

Hey,

Thank you for your response. Yes, this is the same as the topic you mentioned. I’ll be looking into it later and let you know.

Thanks!
:smiley:

Thank you for the confirmation. I will then close this topic.