Skip to content

Conversation

@jcaianirh
Copy link
Contributor

@jcaianirh jcaianirh commented Jan 7, 2020

Add showOnlySelectionCount property to Select component to display only the selection count rather than all selected values.

Screen Shot 2020-01-06 at 10 10 34 PM

Screen Shot 2020-01-06 at 10 10 45 PM

What: Closes ##3456
Additional issues:

…mponent to display only the sel

Add showOnlySelectionCount property to Select component to display only the selection count rather
than selection v

3456
@patternfly-build
Copy link
Collaborator

PatternFly-React preview: https://patternfly-react-pr-3457.surge.sh

@codecov-io
Copy link

codecov-io commented Jan 7, 2020

Codecov Report

Merging #3457 into master will decrease coverage by <.01%.
The diff coverage is 66.66%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3457      +/-   ##
==========================================
- Coverage   67.09%   67.09%   -0.01%     
==========================================
  Files         903      903              
  Lines       25471    25474       +3     
  Branches     2251     2252       +1     
==========================================
+ Hits        17091    17092       +1     
- Misses       7342     7343       +1     
- Partials     1038     1039       +1
Flag Coverage Δ
#misc 95.45% <ø> (ø) ⬆️
#patternfly3 69.29% <ø> (ø) ⬆️
#patternfly4 64.19% <66.66%> (-0.01%) ⬇️
Impacted Files Coverage Δ
...nfly-4/react-core/src/components/Select/Select.tsx 64.14% <66.66%> (-0.15%) ⬇️
...y-react-extensions/src/components/Select/Select.js 19.52% <0%> (-0.1%) ⬇️

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 d88fae5...fb354f5. Read the comment docs.

{selections && (Array.isArray(selections) && selections.length > 0) && selectedChips}
{selections && showOnlySelectionCount && (Array.isArray(selections) && selections.length > 0) && (
<div className={css(styles.selectToggleBadge)}>
<span className={css(badgeStyles.badge, badgeStyles.modifiers.read)}>{selections.length}</span>
Copy link

Choose a reason for hiding this comment

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

Just curious, why did you not do <Badge isRead>{selections.length}</Badge> instead of using css classes?

@jcaianirh
Copy link
Contributor Author

After a conversation with @mcarrano and @zherman0 there is a longer term change in the works for the select component. closing this pr

@jcaianirh jcaianirh closed this Jan 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants