Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

粘贴修改单元格数据后没执行 hooks.afterUpdateCell 方法 #606

Open
Rio-shuai opened this issue Sep 29, 2024 · 2 comments
Open

Comments

@Rio-shuai
Copy link

Rio-shuai commented Sep 29, 2024

代码:

<Workbook
  hooks={{
    afterUpdateCell:(r,c,o,n)=>{
      //do something
    }
  }}
/>

场景:输入修改单元格数据时会执行 afterUpdateCell 方法,但是粘贴进这个单元格时不会执行afterUpdateCell这个方法。
Scenario: The afterUpdateCell method is executed when input changes cell data, but the afterUpdateCell method is not executed when pasting into the cell.

预期:不确定是否为bug,我认为粘贴修改了单元格数据后 也执行afterUpdateCell方法比较合理。同理还有beforeUpdate
Expectations: Not sure if it's a bug, I think it's reasonable to do afterUpdateCell after pasting and modifying the cell data. Same with beforeUpdate.

@sanchit3008
Copy link
Collaborator

sanchit3008 commented Sep 29, 2024 via email

@sanchit3008
Copy link
Collaborator

there is a slight issue in adding these to paste, because afterUpdateCell and beforeUpdateCell expect row and col of the cels, while the paste operation works on a selection range. only way i can think of is to call these hooks multiple times individually for each cell update but it does not sound that good to me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants