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

Allow calling recomputeTree without arguments #8

Merged
merged 2 commits into from
Dec 4, 2019
Merged

Conversation

Lodin
Copy link
Owner

@Lodin Lodin commented Dec 4, 2019

This PR allows to call FixedSizeTree#recomputeTree and VariableSizeTree#recomputeTree methods without arguments. It addresses the issue raised in #7 (comment).

You can use it in the following way:

await tree.recomuteTree();

Default options for FixedSizeTree are:

const options = {
  refreshNodes: false,
  useDefaultOpenness: false,
};

Default options for VariableSizeTree are:

const options = {
  refreshNodes: false,
  useDefaultHeight: false,
  useDefaultOpenness: false,
};

Also, this PR updates all dependencies and refactors code to use optional chaining and the Typescript stricter generators.

Lodin added 2 commits December 4, 2019 12:26
Also updates syntax & types to the latest version of language
@Lodin Lodin self-assigned this Dec 4, 2019
@codecov
Copy link

codecov bot commented Dec 4, 2019

Codecov Report

Merging #8 into master will decrease coverage by 0.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master       #8      +/-   ##
==========================================
- Coverage   99.27%   99.26%   -0.02%     
==========================================
  Files           3        3              
  Lines         138      136       -2     
  Branches       30       28       -2     
==========================================
- Hits          137      135       -2     
  Misses          1        1
Impacted Files Coverage Δ
src/utils.tsx 100% <ø> (ø) ⬆️
src/VariableSizeTree.tsx 98.71% <100%> (-0.04%) ⬇️
src/FixedSizeTree.tsx 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2c2a009...4d3b900. Read the comment docs.

@Lodin Lodin merged commit e3fb63e into master Dec 4, 2019
@Lodin Lodin deleted the fix/optional-options branch December 4, 2019 10:21
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.

1 participant