feat(ui) - hide main searchbar for assist use default user filter
This commit is contained in:
parent
967b885c16
commit
23c0c5aa1f
3 changed files with 10 additions and 7 deletions
|
|
@ -186,7 +186,7 @@ export default class BugFinder extends React.PureComponent {
|
|||
{ activeTab.type === 'live' && (
|
||||
<>
|
||||
<div className="mb-5">
|
||||
<LiveSearchBar />
|
||||
{/* <LiveSearchBar /> */}
|
||||
<LiveSessionSearch />
|
||||
</div>
|
||||
{ activeTab.type === 'live' && <LiveSessionList /> }
|
||||
|
|
|
|||
|
|
@ -1,14 +1,16 @@
|
|||
import React from 'react';
|
||||
import FilterList from 'Shared/Filters/FilterList';
|
||||
import { connect } from 'react-redux';
|
||||
import { edit, addFilter } from 'Duck/liveSearch';
|
||||
import { edit, addFilter, addFilterByKeyAndValue } from 'Duck/liveSearch';
|
||||
import FilterSelection from 'Shared/Filters/FilterSelection';
|
||||
import { IconButton } from 'UI';
|
||||
import { FilterKey } from 'App/types/filter/filterType';
|
||||
|
||||
interface Props {
|
||||
appliedFilter: any;
|
||||
edit: typeof edit;
|
||||
addFilter: typeof addFilter;
|
||||
addFilterByKeyAndValue: typeof addFilterByKeyAndValue;
|
||||
}
|
||||
function LiveSessionSearch(props: Props) {
|
||||
const { appliedFilter } = props;
|
||||
|
|
@ -39,9 +41,10 @@ function LiveSessionSearch(props: Props) {
|
|||
return i !== filterIndex;
|
||||
});
|
||||
|
||||
props.edit({
|
||||
filters: newFilters,
|
||||
});
|
||||
props.edit({ filters: newFilters, });
|
||||
if (newFilters.size === 0) {
|
||||
props.addFilterByKeyAndValue(FilterKey.USERID, '');
|
||||
}
|
||||
}
|
||||
|
||||
const onChangeEventsOrder = (e, { name, value }) => {
|
||||
|
|
@ -77,4 +80,4 @@ function LiveSessionSearch(props: Props) {
|
|||
|
||||
export default connect(state => ({
|
||||
appliedFilter: state.getIn([ 'liveSearch', 'instance' ]),
|
||||
}), { edit, addFilter })(LiveSessionSearch);
|
||||
}), { edit, addFilter, addFilterByKeyAndValue })(LiveSessionSearch);
|
||||
|
|
@ -7,6 +7,7 @@ import SavedFilter from 'Types/filter/savedFilter';
|
|||
import { fetchList as fetchSessionList } from './sessions';
|
||||
import { liveFiltersMap } from 'Types/filter/newFilter';
|
||||
import { filterMap, checkFilterValue, hasFilterApplied } from './search';
|
||||
import { FilterKey } from '../types/filter/filterType';
|
||||
|
||||
const name = "liveSearch";
|
||||
const idKey = "searchId";
|
||||
|
|
@ -63,7 +64,6 @@ export const fetchSessions = (filter) => (dispatch, getState) => {
|
|||
};
|
||||
|
||||
export const clearSearch = () => (dispatch, getState) => {
|
||||
// dispatch(applySavedSearch(new SavedFilter({})));
|
||||
dispatch(edit(new Filter({ filters: [] })));
|
||||
return dispatch({
|
||||
type: CLEAR_SEARCH,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue