web: components: added possibility to hide combo box with count items info

This commit is contained in:
Vladislav Makhov 2020-12-23 17:55:03 +03:00
parent 3d46b8e516
commit 9a567d3e53

View File

@ -64,6 +64,7 @@ const Paging = (props) => {
id,
className,
style,
showCountItem,
} = props;
const onSelectPageAction = (option) => {
@ -110,7 +111,8 @@ const Paging = (props) => {
isDisabled={disableNext}
disableHover={disableHover}
/>
{countItems && (
{showCountItem
? countItems && (
<StyledOnPage>
<ComboBox
className="hideDisabled"
@ -121,7 +123,8 @@ const Paging = (props) => {
selectedOption={selectedCountItem}
/>
</StyledOnPage>
)}
)
: null}
</StyledPaging>
);
};
@ -151,12 +154,15 @@ Paging.propTypes = {
className: PropTypes.string,
id: PropTypes.string,
style: PropTypes.oneOfType([PropTypes.object, PropTypes.array]),
showCountItem: PropTypes.bool.isRequired,
};
Paging.defaultProps = {
disablePrevious: false,
disableNext: false,
disableHover: false,
showCountItem: true,
};
export default Paging;