Skip to content

Commit

Permalink
fix(filter-picker): fix style of FilterCondition (#1920)
Browse files Browse the repository at this point in the history
Co-authored-by: maxin <maxin@growingio.com>
  • Loading branch information
nnmax and maxin committed Mar 23, 2022
1 parent 4138ed1 commit 8c44134
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 33 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,30 @@
padding: 0;
}
}

.filter-condition_select {
position: relative;
display: inline-block;
box-sizing: border-box;
width: auto;
min-width: 40px;
max-width: 160px;
height: 30px;
margin-left: 8px;
padding: 4px 8px;
color: #313e75;
font-size: 14px;
line-height: 22px;
text-align: left;
vertical-align: middle;
border-radius: 4px;

.filter-condition_select-text {
display: inline-block;
width: 100%;
padding-right: 20px;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { useEffect, useMemo, useState } from 'react';
import React, { useMemo, useState } from 'react';
import { useLocale } from '@gio-design/utils';
import parseValuesToText from './utils';
import FilterAttrOverlay from './FilterAttrOverlay';
Expand Down Expand Up @@ -54,11 +54,6 @@ function FilterCondition(props: FilterConditionProps) {
setVisible(v);
};

useEffect(() => {
console.log('mount');
return () => console.log('unmount');
}, []);

const curryDimensionValueRequest = (
(timeRangeValue: string, measurementsValue: any[]) => (dimension: string, keyword: string) =>
dimensionValueRequest?.({
Expand All @@ -85,6 +80,8 @@ function FilterCondition(props: FilterConditionProps) {
disabled={conditionText === textObject.selectFilter}
getContainer={() => document.body}
placement="topLeft"
distoryOnHide={false}
trigger="click"
>
<span className="filter-condition_select-text">{conditionText}</span>
</Tooltip>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,31 +23,4 @@
background-color: #dfe4ee;
border-radius: 12px;
}

.filter-condition_select {
position: relative;
display: inline-block;
box-sizing: border-box;
width: auto;
min-width: 40px;
max-width: 160px;
height: 30px;
margin-left: 8px;
padding: 4px 8px;
color: #313e75;
font-size: 14px;
line-height: 22px;
text-align: left;
vertical-align: middle;
border-radius: 4px;

.filter-condition_select-text {
display: inline-block;
width: 100%;
padding-right: 20px;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
}
}

1 comment on commit 8c44134

@vercel
Copy link

@vercel vercel bot commented on 8c44134 Mar 23, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.