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

feat: customize column header #2333

Merged
merged 1 commit into from
Jun 19, 2024
Merged

feat: customize column header #2333

merged 1 commit into from
Jun 19, 2024

Conversation

lumixraku
Copy link
Contributor

@lumixraku lumixraku commented May 28, 2024

close #859
https://github.com/dream-num/univer-pro/issues/859

Customize column header in render layer.

univerAPI.customizeColumnHeader({ headerStyle:{backgroundColor: 'pink', fontSize: 9}, columnsCfg: ['ASC', 'MokaII', undefined, {text: 'Size', textAlign: 'left'}, {text: 'MUJI', fontSize: 15, textAlign: 'right'}, {text: 'SRI-RESOLVE', fontSize: 10, textAlign: 'left', fontColor: 'blue', backgroundColor: 'wheat'}, null, null, 'ss', {fontSize: 29, fontColor:'red', text: 'hash'}]})

Use headerStyle to set the style for all columns, and use columnsCfg to customize the style of each column in order.

Pull Request Checklist

  • Naming convention is followed (do please check it especially when you created new plugins, commands and resources).
  • Related tickets or issues have been linked in the PR description (or missing issue).
  • Unit tests have been added for the changes (if applicable).
  • Breaking changes have been documented (or no breaking changes introduced in this PR).

Copy link

codecov bot commented May 28, 2024

Codecov Report

Attention: Patch coverage is 7.79221% with 71 lines in your changes missing coverage. Please review.

Project coverage is 27.16%. Comparing base (54edf21) to head (047a051).

Files Patch % Lines
...mponents/sheets/extensions/column-header-layout.ts 0.00% 66 Missing ⚠️
...gine-render/src/components/sheets/column-header.ts 0.00% 3 Missing ⚠️
packages/facade/src/apis/facade.ts 75.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##              dev    #2333      +/-   ##
==========================================
- Coverage   27.18%   27.16%   -0.02%     
==========================================
  Files        1653     1653              
  Lines       83623    83685      +62     
  Branches    17400    17420      +20     
==========================================
+ Hits        22729    22736       +7     
- Misses      60894    60949      +55     

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

Copy link

github-actions bot commented May 28, 2024

View Deployment

📑 Examples 📚 Storybook
🔗 Preview link 🔗 Preview link

@lumixraku lumixraku changed the title Feat/customize col header feat: Customize column header May 28, 2024
@lumixraku lumixraku changed the title feat: Customize column header feat: customize column header May 28, 2024
@lumixraku lumixraku force-pushed the feat/customize-col-header branch 3 times, most recently from fad8abc to d25d393 Compare May 28, 2024 11:39
@lumixraku lumixraku requested a review from wzhudev May 28, 2024 11:48
examples/esbuild.config.mjs Outdated Show resolved Hide resolved
@lumixraku lumixraku force-pushed the feat/customize-col-header branch 2 times, most recently from fd2ee17 to 0a2cd26 Compare May 29, 2024 04:08
@lumixraku lumixraku requested a review from jikkai May 29, 2024 08:39
@KrutchenkoEA KrutchenkoEA mentioned this pull request Jun 7, 2024
4 tasks
@lumixraku lumixraku self-assigned this Jun 19, 2024
@lumixraku lumixraku merged commit 4f8eae1 into dev Jun 19, 2024
9 checks passed
@lumixraku lumixraku deleted the feat/customize-col-header branch June 19, 2024 03:32
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

Successfully merging this pull request may close these issues.

3 participants