Fixed issue where color panel git cut off in value selector (#664)

This commit is contained in:
Harshil Sharma 2021-07-08 10:06:29 +05:30 committed by GitHub
parent 5b82dfda4b
commit f01add651c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 19 additions and 1 deletions

View file

@ -7,6 +7,7 @@
> .Label { > .Label {
margin: 0 10px; margin: 0 10px;
max-width: calc(100% - 10px); max-width: calc(100% - 10px);
&.empty { &.empty {
color: rgba(var(--body-color), 0.6); color: rgba(var(--body-color), 0.6);
} }
@ -41,21 +42,32 @@
width: 100%; width: 100%;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
.label-container { .label-container {
flex-grow: 1; flex-grow: 1;
display: flex; display: flex;
} }
.MenuWrapper { .MenuWrapper {
display: flex; display: flex;
align-self: flex-end; align-self: flex-end;
.IconButton { .IconButton {
background-color: unset; background-color: unset;
&:hover { &:hover {
background-color: rgba(var(--body-color), 0.1); background-color: rgba(var(--body-color), 0.1);
} }
} }
} }
} }
div:nth-child(3) {
div {
overflow-y: unset;
overflow-x: unset;
}
}
} }
.label-container > .Label { .label-container > .Label {

View file

@ -126,13 +126,19 @@ const valueSelectorStyle = {
multiValueRemove: (): CSSObject => ({ multiValueRemove: (): CSSObject => ({
display: 'none', display: 'none',
}), }),
menu: (provided: CSSObject): CSSObject => ({
...provided,
width: 'unset',
background: 'rgb(var(--main-bg))',
minWidth: '260px',
}),
} }
function ValueSelector(props: Props): JSX.Element { function ValueSelector(props: Props): JSX.Element {
return ( return (
<CreatableSelect <CreatableSelect
captureMenuScroll={true} captureMenuScroll={true}
maxMenuHeight={580} maxMenuHeight={1200}
isMulti={props.isMulti} isMulti={props.isMulti}
isClearable={true} isClearable={true}
styles={valueSelectorStyle} styles={valueSelectorStyle}