@@ -12,12 +12,13 @@ import { FilterQuickSearch } from '../filterQuickSearch/FilterQuickSearch';
12
12
import { FiltersAppliedInfo } from '../filtersAppliedInfo/FiltersAppliedInfo' ;
13
13
import { FilterGroup as IFilterGroup } from '../../types' ;
14
14
import { useFilterContext } from '../../context/filterContext' ;
15
- import { StyledButton } from '../toggleHideFilterPopover/toggleHideFilterPopover.styles' ;
15
+ import { StyledButton , StyledButtonContent } from '../toggleHideFilterPopover/toggleHideFilterPopover.styles' ;
16
16
import { FilterClearIcon , FilterCollapseIcon , FilterExpandIcon } from '../../icons' ;
17
17
import { ToggleHideFilterPopover } from '../toggleHideFilterPopover/ToggleHideFilterPopover' ;
18
18
import { FilterView } from '../filterView/FilterView' ;
19
19
import { useFilterStyles } from '../../hooks/useFilterStyles' ;
20
20
import { FilterLoadingFallback } from '../Filter' ;
21
+ import { Button , Tooltip } from '@equinor/eds-core-react' ;
21
22
22
23
/**
23
24
* How to separate controller and visual logic in this component?
@@ -111,13 +112,25 @@ const QuickFilterReady = ({ groups }: QuickFilterReadyProps) => {
111
112
< FiltersAppliedInfo activeFilters = { calculateHiddenFiltersApplied ( ) } />
112
113
{ isFilterExpanded && < ToggleHideFilterPopover allFilters = { allFilterGroups } setFilterOrder = { setFilterOrder } /> }
113
114
114
- < StyledButton onClick = { ( ) => clearActiveFilters ( ) } >
115
- < FilterClearIcon isDisabled = { uncheckedValues . map ( ( s ) => s . values ) . flat ( ) . length === 0 } />
116
- </ StyledButton >
117
-
118
- < StyledButton onClick = { toggleFilterIsExpanded } >
119
- { isFilterExpanded ? < FilterCollapseIcon /> : < FilterExpandIcon /> }
120
- </ StyledButton >
115
+ < Tooltip title = "Clear all active filters" >
116
+ < StyledButton onClick = { ( ) => clearActiveFilters ( ) } >
117
+ < FilterClearIcon isDisabled = { uncheckedValues . map ( ( s ) => s . values ) . flat ( ) . length === 0 } />
118
+ </ StyledButton >
119
+ </ Tooltip >
120
+
121
+ < Tooltip title = { isFilterExpanded ? 'Hide all filter options' : 'Show all filter options' } >
122
+ < Button variant = "ghost" onClick = { toggleFilterIsExpanded } >
123
+ { isFilterExpanded ? (
124
+ < StyledButtonContent >
125
+ < FilterCollapseIcon /> < div > Hide all</ div >
126
+ </ StyledButtonContent >
127
+ ) : (
128
+ < StyledButtonContent >
129
+ < FilterExpandIcon /> < div > Show all</ div >
130
+ </ StyledButtonContent >
131
+ ) }
132
+ </ Button >
133
+ </ Tooltip >
121
134
</ StyledButtonWrapper >
122
135
</ StyledCompactFilterWrapper >
123
136
{ isFilterExpanded && (
0 commit comments