File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
frontend/src/components/Topics/Topic/Messages/Filters Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ import { useTopicDetails } from 'lib/hooks/api/topics';
17
17
import EditIcon from 'components/common/Icons/EditIcon' ;
18
18
import CloseIcon from 'components/common/Icons/CloseIcon' ;
19
19
import FlexBox from 'components/common/FlexBox/FlexBox' ;
20
+ import { useMessageFiltersStore } from 'lib/hooks/useMessageFiltersStore' ;
20
21
21
22
import * as S from './Filters.styled' ;
22
23
import {
@@ -66,6 +67,7 @@ const Filters: React.FC<FiltersProps> = ({
66
67
67
68
const { data : topic } = useTopicDetails ( { clusterName, topicName } ) ;
68
69
const [ createdEditedSmartId , setCreatedEditedSmartId ] = useState < string > ( ) ;
70
+ const remove = useMessageFiltersStore ( ( state ) => state . remove ) ;
69
71
70
72
const partitions = useMemo ( ( ) => {
71
73
return ( topic ?. partitions || [ ] ) . reduce < {
@@ -209,7 +211,10 @@ const Filters: React.FC<FiltersProps> = ({
209
211
< EditIcon />
210
212
</ S . EditSmartFilterIcon >
211
213
< S . DeleteSmartFilterIcon
212
- onClick = { ( ) => setSmartFilter ( null ) }
214
+ onClick = { ( ) => {
215
+ setSmartFilter ( null ) ;
216
+ remove ( smartFilter . id ) ;
217
+ } }
213
218
disabled = { ! ! createdEditedSmartId }
214
219
>
215
220
< CloseIcon />
You can’t perform that action at this time.
0 commit comments