Skip to content

Commit 4f8015b

Browse files
authored
Update design #2 (#583)
* Reduce select input border radius to 2px * Remove select indicator separator * Fix select options height * v5.0.69
1 parent 6f29727 commit 4f8015b

2 files changed

Lines changed: 7 additions & 4 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@netdata/netdata-ui",
3-
"version": "5.0.68",
3+
"version": "5.0.69",
44
"description": "netdata UI kit",
55
"main": "dist/index.js",
66
"module": "dist/es6/index.js",

src/components/select/index.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ const customComponents = {
6565
Group: withDataAttrs(defaultComponents.Group, "Group"),
6666
GroupHeading: withDataAttrs(defaultComponents.GroupHeading, "GroupHeading"),
6767
IndicatorsContainer: withDataAttrs(defaultComponents.IndicatorsContainer, "IndicatorsContainer"),
68-
IndicatorSeparator: withDataAttrs(defaultComponents.IndicatorSeparator, "IndicatorSeparator"),
68+
IndicatorSeparator: null,
6969
Input: withDOMDataAttrs(defaultComponents.Input, "Input"),
7070
LoadingIndicator: withDataAttrs(defaultComponents.LoadingIndicator, "LoadingIndicator"),
7171
Menu: withDataAttrs(defaultComponents.Menu, "Menu"),
@@ -84,7 +84,7 @@ const customComponents = {
8484
ValueContainer: withDataAttrs(defaultComponents.ValueContainer, "ValueContainer"),
8585
}
8686

87-
const VirtualItem = ({ virtualRow, child }) => (
87+
const VirtualItem = ({ virtualRow, child, virtualizer }) => (
8888
<div
8989
key={virtualRow.key}
9090
style={{
@@ -94,6 +94,7 @@ const VirtualItem = ({ virtualRow, child }) => (
9494
right: 0,
9595
position: "absolute",
9696
}}
97+
ref={virtualizer.measureElement}
9798
data-index={virtualRow.index}
9899
>
99100
{child}
@@ -122,6 +123,7 @@ const VirtualList = ({ children, parentRef }) => {
122123
key={virtualRow.key}
123124
virtualRow={virtualRow}
124125
child={children[virtualRow.index]}
126+
virtualizer={virtualizer}
125127
/>
126128
))}
127129
</div>
@@ -183,6 +185,7 @@ const makeCustomStyles = (theme, { minWidth, size, ...providedStyles } = {}) =>
183185
control: (styles, state) => ({
184186
...styles,
185187
borderColor: state.isFocused ? theme.colors.inputBorderFocus : theme.colors.inputBorder,
188+
borderRadius: "2px",
186189
boxShadow: "none",
187190
minHeight: 18,
188191
minWidth: minWidth || 160,
@@ -201,7 +204,7 @@ const makeCustomStyles = (theme, { minWidth, size, ...providedStyles } = {}) =>
201204
}
202205
: {}),
203206
}),
204-
menu: styles => ({ ...styles, zIndex: 100 }),
207+
menu: styles => ({ ...styles, borderRadius: "2px", zIndex: 100 }),
205208
menuPortal: styles => ({ ...styles, zIndex: 9999 }),
206209
multiValue: styles => ({
207210
...styles,

0 commit comments

Comments
 (0)