change(ui): card filter series defualt behaviour
This commit is contained in:
parent
3f6c1dad6f
commit
1fd0de1159
2 changed files with 12 additions and 11 deletions
|
|
@ -136,9 +136,9 @@ function FilterSeries(props: Props) {
|
||||||
toggleExpand={() => setExpanded(!expanded)}/>
|
toggleExpand={() => setExpanded(!expanded)}/>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
{expandable && !expanded && (
|
{expandable && (
|
||||||
<Space className="justify-between w-full px-5 py-2 cursor-pointer" onClick={() => setExpanded(!expanded)}>
|
<Space className="justify-between w-full px-5 py-2 cursor-pointer" onClick={() => setExpanded(!expanded)}>
|
||||||
<FilterCountLabels filters={series.filter.filters} toggleExpand={() => setExpanded(!expanded)}/>
|
<div>{!expanded && <FilterCountLabels filters={series.filter.filters} toggleExpand={() => setExpanded(!expanded)}/>}</div>
|
||||||
<Button size="small"
|
<Button size="small"
|
||||||
icon={expanded ? <ChevronUp size={16}/> : <ChevronDown size={16}/>}/>
|
icon={expanded ? <ChevronUp size={16}/> : <ChevronDown size={16}/>}/>
|
||||||
</Space>
|
</Space>
|
||||||
|
|
@ -156,13 +156,13 @@ function FilterSeries(props: Props) {
|
||||||
supportsEmpty={supportsEmpty}
|
supportsEmpty={supportsEmpty}
|
||||||
onFilterMove={onFilterMove}
|
onFilterMove={onFilterMove}
|
||||||
excludeFilterKeys={excludeFilterKeys}
|
excludeFilterKeys={excludeFilterKeys}
|
||||||
actions={[
|
// actions={[
|
||||||
expandable && (
|
// expandable && (
|
||||||
<Button onClick={() => setExpanded(!expanded)}
|
// <Button onClick={() => setExpanded(!expanded)}
|
||||||
size="small"
|
// size="small"
|
||||||
icon={expanded ? <ChevronUp size={16}/> : <ChevronDown size={16}/>}/>
|
// icon={expanded ? <ChevronUp size={16}/> : <ChevronDown size={16}/>}/>
|
||||||
)
|
// )
|
||||||
]}
|
// ]}
|
||||||
/>
|
/>
|
||||||
) : (
|
) : (
|
||||||
<div className="color-gray-medium">{emptyMessage}</div>
|
<div className="color-gray-medium">{emptyMessage}</div>
|
||||||
|
|
|
||||||
|
|
@ -37,8 +37,9 @@ function WidgetFormNew() {
|
||||||
return isPredefined ? <PredefinedMessage /> : (
|
return isPredefined ? <PredefinedMessage /> : (
|
||||||
<Space direction="vertical" className="w-full">
|
<Space direction="vertical" className="w-full">
|
||||||
<AdditionalFilters />
|
<AdditionalFilters />
|
||||||
{!hasFilters && (<DefineSteps metric={metric} excludeFilterKeys={excludeFilterKeys} />)}
|
{/*{!hasFilters && (<DefineSteps metric={metric} excludeFilterKeys={excludeFilterKeys} />)}*/}
|
||||||
{hasFilters && (<FilterSection metric={metric} excludeFilterKeys={excludeFilterKeys} />)}
|
{/*{hasFilters && (<FilterSection metric={metric} excludeFilterKeys={excludeFilterKeys} />)}*/}
|
||||||
|
<FilterSection metric={metric} excludeFilterKeys={excludeFilterKeys} />
|
||||||
</Space>
|
</Space>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue