diff --git a/lib/sectioned-multi-select.js b/lib/sectioned-multi-select.js index 3e08b3f..5b1e2e5 100644 --- a/lib/sectioned-multi-select.js +++ b/lib/sectioned-multi-select.js @@ -94,6 +94,12 @@ const defaultStyles = { }, selectedItem: { + }, + selectTextCaption:{ + + }, + viewSelector:{ + }, } @@ -210,7 +216,8 @@ class SectionedMultiSelect extends PureComponent { chipsPosition: PropTypes.oneOf(['top', 'bottom']), autoFocus: PropTypes.bool, iconKey: PropTypes.string, - disabled: PropTypes.bool + disabled: PropTypes.bool, + showSelectTextCaption: PropTypes.bool } static defaultProps = { @@ -254,7 +261,8 @@ class SectionedMultiSelect extends PureComponent { noItemsComponent: noItems, chipsPosition: 'bottom', autoFocus: false, - disabled: false + disabled: false, + showSelectTextCaption: false } constructor(props) { @@ -898,7 +906,9 @@ class SectionedMultiSelect extends PureComponent { stickyFooterComponent, chipsPosition, autoFocus, - disabled + disabled, + selectText, + showSelectTextCaption } = this.props const { @@ -911,7 +921,7 @@ class SectionedMultiSelect extends PureComponent { const confirmFont = confirmFontFamily.fontFamily && confirmFontFamily const searchTextFont = searchTextFontFamily.fontFamily && searchTextFontFamily return ( - + {this._getSelectLabel()} + {(selectedItems.length === 1 && showSelectTextCaption) && + + {selectText} + } {selectToggleIconComponent ? selectToggleIconComponent :