File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
src/pages/ws/ui/control-panel Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -6,18 +6,23 @@ import { useParams } from '@core/hooks/use-params'
6
6
import { SessionStoreManager } from '@core/storage-management/session-store-manager'
7
7
import { t } from '@i18n'
8
8
import filterStore from '@store/filter'
9
+ import filterPresetsStore from '@store/filter-presets'
9
10
import { Routes } from '@router/routes.enum'
10
11
import { Button } from '@ui/button'
11
12
import { GlbPagesNames } from '@glb/glb-names'
12
13
import { FILTER_REFERRER } from '@pages/filter/common/filter-control/filter-control.const'
13
14
14
15
export const EditFilter = observer ( ( ) : ReactElement => {
15
- const histroy = useHistory ( )
16
+ const history = useHistory ( )
16
17
const params = useParams ( )
18
+ const { activePreset } = filterPresetsStore
17
19
18
20
const handleClick = ( ) => {
21
+ let location = `${ Routes . Refiner } ?ds=${ params . get ( 'ds' ) } `
22
+
23
+ location = activePreset ? `${ location } &preset=${ activePreset } ` : location
19
24
SessionStoreManager . write ( FILTER_REFERRER , GlbPagesNames . Table )
20
- histroy . push ( ` ${ Routes . Refiner } ?ds= ${ params . get ( 'ds' ) } ` )
25
+ history . push ( location )
21
26
filterStore . setMethod ( GlbPagesNames . Refiner )
22
27
}
23
28
You can’t perform that action at this time.
0 commit comments