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(Stack): filter children that should not be rendered #2732

Merged
merged 5 commits into from
Sep 22, 2022

Conversation

MarvelSQ
Copy link
Member

@MarvelSQ MarvelSQ commented Sep 19, 2022

CHANGES

use React.Children.toArray remove empty children like null, undefined & boolean value.

ISSUE

close #2731

@vercel
Copy link

vercel bot commented Sep 19, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
rsuite-nextjs ✅ Ready (Inspect) Visit Preview Sep 22, 2022 at 5:18AM (UTC)
1 Ignored Deployment
Name Status Preview Updated
rsuite-v4 ⬜️ Ignored (Inspect) Sep 22, 2022 at 5:18AM (UTC)

@codesandbox-ci
Copy link

codesandbox-ci bot commented Sep 19, 2022

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 01a7b11:

Sandbox Source
rsuite-tp-ci Configuration
pensive-mestorf-cfondk Issue #2731

@codecov
Copy link

codecov bot commented Sep 19, 2022

Codecov Report

Base: 85.46% // Head: 85.46% // Increases project coverage by +0.00% 🎉

Coverage data is based on head (01a7b11) compared to base (f4a4f15).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2732   +/-   ##
=======================================
  Coverage   85.46%   85.46%           
=======================================
  Files         297      297           
  Lines        9117     9118    +1     
  Branches     2580     2580           
=======================================
+ Hits         7792     7793    +1     
  Misses        693      693           
  Partials      632      632           
Flag Coverage Δ
ChromeCi 85.43% <100.00%> (+<0.01%) ⬆️
Firefox 85.41% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/Stack/Stack.tsx 80.00% <100.00%> (+0.83%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

src/Stack/test/StackSpec.js Outdated Show resolved Hide resolved
@MarvelSQ MarvelSQ force-pushed the fix/stack-empty-child branch from e1cb308 to 01a7b11 Compare September 22, 2022 05:08
@simonguo simonguo changed the title Fix/stack empty child fix(Stack): filter children that should not be rendered Sep 22, 2022
@SevenOutman SevenOutman merged commit 23c283f into main Sep 22, 2022
@SevenOutman SevenOutman deleted the fix/stack-empty-child branch September 22, 2022 07:46
myNameIsDu pushed a commit to myNameIsDu/rsuite that referenced this pull request Oct 12, 2022
* fix(Stack): remove empty child

* test(Stack): add empty child case

* fix(Stack): fix test case

* fix(Stack): fix children count

* test(Stack): change test assertion
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.

Stack render false child
3 participants