From 8cf5a05ef494127e1e116ea4ef30a80671598597 Mon Sep 17 00:00:00 2001 From: Alexey Safronov Date: Sun, 3 Nov 2019 13:23:20 +0300 Subject: [PATCH] web: Components: Styled row-block selection AdvancedSelector v2 --- .../sub-components/selector.js | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/web/ASC.Web.Components/src/components/advanced-selector2/sub-components/selector.js b/web/ASC.Web.Components/src/components/advanced-selector2/sub-components/selector.js index aa3cb9b5a5..ea52d88fb5 100644 --- a/web/ASC.Web.Components/src/components/advanced-selector2/sub-components/selector.js +++ b/web/ASC.Web.Components/src/components/advanced-selector2/sub-components/selector.js @@ -58,7 +58,12 @@ const StyledContainer = styled(Container)` .body2 { grid-area: body2; + margin-left: -8px; /* background-color: white; */ + + .row-block { + padding-left: 8px; + } } } ` @@ -88,13 +93,17 @@ const StyledContainer = styled(Container)` .body1 { grid-area: body1; + margin-left: -8px; /* background-color: white; */ + + .row-block { + padding-left: ${props => (props.isMultiSelect ? 8 : 0)}px; + } } } .row-block { line-height: 32px; - padding-left: 8px; cursor: pointer; &:hover { @@ -111,8 +120,6 @@ const StyledContainer = styled(Container)` } `; - - const ADSelector = props => { const { displayType, groups, selectButtonLabel, isDisabled, isMultiSelect, hasNextPage, options, @@ -243,7 +250,7 @@ const ADSelector = props => { const loadMoreItems = isNextPageLoading ? () => { } : loadNextPage; return ( - + { itemSize={32} onItemsRendered={onItemsRendered} ref={ref} - width={width} + width={width + (isMultiSelect ? 8 : 0)} outerElementType={CustomScrollbarsVirtualList} > {renderOption} @@ -299,7 +306,7 @@ const ADSelector = props => {