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

fix(sheet): cell custom supports updating from mutation #2058

Merged
merged 1 commit into from Apr 25, 2024

Conversation

Dushusir
Copy link
Member

@Dushusir Dushusir commented Apr 24, 2024

cell custom supports updating from mutation

如何测试?

打开浏览器控制台,打开Uniscript脚本编辑器,输入

const range = univerAPI.getActiveWorkbook()?.getActiveSheet()?.getRange(1, 1, 1, 1);
if(range){
    range.setValue({
        v: 1,
        // custom 对象中可以放置任何 JSON 内容
        custom:{
            id: 1
        }
    })

    console.info(range.getCellData())
}

可以看到打印出的结果中包含自定义的数据即成功
image

Copy link

github-actions bot commented Apr 24, 2024

View Deployment

📑 Examples 📚 Storybook
🔗 Preview link 🔗 Preview link

@univer-bot
Copy link

univer-bot bot commented Apr 24, 2024

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿

Origin Title: fix(sheet): cell custom supports updating from mutation

Title: fix(sheet): cell custom supports updating from mutation


cell custom supports updating from mutation

How to test?

Open the browser console, open the Uniscript script editor, and enter

const range = univerAPI.getActiveWorkbook()?.getActiveSheet()?.getRange(1, 1, 1, 1);
if(range){
    range.setValue({
        v: 1,
        // Any JSON content can be placed in the custom object
        custom:{
            ID: 1
        }
    })

    console.info(range.getCellData())
}

You can see that the printed results contain customized data and it is successful.
image

Copy link

codecov bot commented Apr 24, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 29.74%. Comparing base (ad1d632) to head (999aaae).

Additional details and impacted files
@@           Coverage Diff           @@
##              dev    #2058   +/-   ##
=======================================
  Coverage   29.74%   29.74%           
=======================================
  Files        1180     1180           
  Lines       64050    64054    +4     
  Branches    13601    13603    +2     
=======================================
+ Hits        19049    19053    +4     
  Misses      45001    45001           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Dushusir Dushusir added the qa:untested This PR is ready to be tested label Apr 24, 2024
@zhaolixin7 zhaolixin7 added the qa:verified This PR has already by verified by a QA and is considered good enough to be merge label Apr 25, 2024
@univer-bot univer-bot bot removed the qa:untested This PR is ready to be tested label Apr 25, 2024
Copy link
Member

@wzhudev wzhudev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@wzhudev wzhudev merged commit bec1944 into dev Apr 25, 2024
9 checks passed
@wzhudev wzhudev deleted the dushusir/cell-custom branch April 25, 2024 03:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
qa:verified This PR has already by verified by a QA and is considered good enough to be merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants