Fix nested buttons in search popout in web UI (#34871)
This commit is contained in:
parent
9c80b16401
commit
c77158c8b7
2 changed files with 12 additions and 5 deletions
|
@ -121,10 +121,15 @@ export const clickSearchResult = createAppAsyncThunk(
|
|||
|
||||
export const forgetSearchResult = createAppAsyncThunk(
|
||||
'search/forgetResult',
|
||||
(q: string, { dispatch, getState }) => {
|
||||
(
|
||||
{ q, type }: { q: string; type?: RecentSearchType },
|
||||
{ dispatch, getState },
|
||||
) => {
|
||||
const previous = getState().search.recent;
|
||||
const me = getState().meta.get('me') as string;
|
||||
const current = previous.filter((result) => result.q !== q);
|
||||
const current = previous.filter(
|
||||
(result) => result.q !== q || result.type !== type,
|
||||
);
|
||||
|
||||
searchHistory.set(me, current);
|
||||
dispatch(updateSearchHistory(current));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue