Skip to content

Deep copy inherited style #1850

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

Merged
merged 6 commits into from
Oct 9, 2021
Merged

Deep copy inherited style #1850

merged 6 commits into from
Oct 9, 2021

Conversation

ikzhr
Copy link
Contributor

@ikzhr ikzhr commented Sep 29, 2021

Summary

When a row is inserted with inherited style, the style of the inserted row is immutable but the style should be mutable.
This PR solves #1813.

Test plan

npm run test:unit
npm run test:integration

Related to source code (for typings update)

Typings update is not required.

Note

I did not implement general deep-copy function because it's too complex for the purpose and the structure of style is known.
However, depending on the known structure weakens resistance to change of style structure so I think the style should be implemented as class with clone method for logic coherent in the future.

@Siemienik Siemienik self-requested a review October 7, 2021 14:16
Copy link
Member

@Siemienik Siemienik left a comment

Choose a reason for hiding this comment

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

Thank you @ikzhr, your changes resolve a problem with styles changes via reference (for rows) and make styles mutable. It looks good to me. 🥇

@Siemienik Siemienik merged commit da5e743 into exceljs:master Oct 9, 2021
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.

2 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy