Web: Common: AdvancesSelector: Added showCounter prop to AdvancesSelector
This commit is contained in:
parent
0b989971a6
commit
638eacd052
@ -11,6 +11,8 @@ const Footer = (props) => {
|
||||
isVisible,
|
||||
className,
|
||||
embeddedComponent,
|
||||
selectedLength,
|
||||
showCounter,
|
||||
} = props;
|
||||
|
||||
return (
|
||||
@ -23,7 +25,7 @@ const Footer = (props) => {
|
||||
className="add_members_btn"
|
||||
primary={true}
|
||||
size="big"
|
||||
label={selectButtonLabel}
|
||||
label={`${selectButtonLabel} ${(selectedLength && showCounter) ? `(${selectedLength})` : ""}`}
|
||||
scale={true}
|
||||
isDisabled={isDisabled}
|
||||
onClick={onClick}
|
||||
|
@ -69,6 +69,7 @@ const Selector = (props) => {
|
||||
size,
|
||||
allowGroupSelection,
|
||||
embeddedComponent,
|
||||
showCounter,
|
||||
} = props;
|
||||
|
||||
//console.log("options", options);
|
||||
@ -706,10 +707,12 @@ const Selector = (props) => {
|
||||
<Footer
|
||||
className="footer"
|
||||
selectButtonLabel={selectButtonLabel}
|
||||
showCounter={showCounter}
|
||||
isDisabled={isDisabled}
|
||||
isVisible={isMultiSelect && hasSelected()}
|
||||
onClick={onAddClick}
|
||||
embeddedComponent={embeddedComponent}
|
||||
selectedLength={selectedOptionList.length}
|
||||
/>
|
||||
</StyledSelector>
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user