kopia lustrzana https://gitlab.com/soapbox-pub/soapbox
Update search to accept newValue as a prop
rodzic
2bdf76a1bc
commit
558ed9e2fb
|
|
@ -49,9 +49,9 @@ const clearSearchResults = () => ({
|
||||||
type: SEARCH_RESULTS_CLEAR,
|
type: SEARCH_RESULTS_CLEAR,
|
||||||
});
|
});
|
||||||
|
|
||||||
const submitSearch = (filter?: SearchFilter) =>
|
const submitSearch = (filter?: SearchFilter, newValue?: string) =>
|
||||||
(dispatch: AppDispatch, getState: () => RootState) => {
|
(dispatch: AppDispatch, getState: () => RootState) => {
|
||||||
const value = getState().search.value;
|
const value = newValue ?? getState().search.value;
|
||||||
const type = filter || getState().search.filter || 'statuses';
|
const type = filter || getState().search.filter || 'statuses';
|
||||||
const accountId = getState().search.accountId;
|
const accountId = getState().search.accountId;
|
||||||
|
|
||||||
|
|
|
||||||
Ładowanie…
Reference in New Issue