-
Notifications
You must be signed in to change notification settings - Fork 0
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
New Props for Facet Term's Icon Style and Persist Active Terms #90
Conversation
const selected = (status !== 'none'); | ||
const count = (term && term.doc_count) || 0; | ||
const isRadio = termIconStyle === 'radio'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(Low priority / not too important, especially if realistically planning on adding more termIconStyle options in near future..).
Try to avoid passing down string props if can, in favor of boolean, if what we ultimately need is boolean (better performance in memoized components). Could probably simplify this and just have either props.useRadioIcon
(w defaultProps.useRadioIcon=false).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@alexkb0009 Yes, definitely makes sense. Replaced termIconStyle
w/ useRadioButton
.
Looks good, want to check on hotseat but then good to merge I think. |
Also should update babel version to the latest on fourfront and local machines (or at least to versions used on CGAP), then I think we would have less differences in /es/ compiled files. |
…mponents into spc_micrometa_updates
…mponents into spc_micrometa_updates
…hared-portal-components into spc_micrometa_updates
Great! It reduced es files having diff from 48 to 29. |
Pls handle this PR with its FF pair.
New props added to extend FacetList and Term components' styling:
useRadioButton
: Show either checkbox (False) or radio icon (True) for term component - it is only for styling, not intended to implement single selection (radio) or multiple selection (checkbox)persistSelectedTerms
: if True selected/omitted terms are escalated to top, otherwise each term is rendered in regular order. Moreover, inline search options are not displayed if it is False.PS: 0.1.28b2 released for testing