Skip to content

Commit

Permalink
progress
Browse files Browse the repository at this point in the history
Signed-off-by: abbyhu2000 <abigailhu2000@gmail.com>
  • Loading branch information
abbyhu2000 committed Aug 30, 2024
1 parent f6006d1 commit 4faa593
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions src/plugins/data/public/ui/search_bar/search_bar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ export interface SearchBarOwnProps {
onRefresh?: (payload: { dateRange: TimeRange }) => void;
indicateNoData?: boolean;
queryResult?: SearchData;
data$?: BehaviorSubject<SearchData>;
}

export type SearchBarProps = SearchBarOwnProps & SearchBarInjectedDeps;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,6 @@ export const TopNav = ({ opts, showSaveQuery, isEnhancementsEnabled }: TopNavPro
const displayToNavLinkInPortal =
isEnhancementsEnabled && !!opts?.optionalRef?.topLinkRef?.current && !showActionsInGroup;

console.log('in discover top nav', data$);

return (
<>
{displayToNavLinkInPortal &&
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -225,8 +225,11 @@ export const useSearch = (services: DiscoverViewServices) => {

data$.next({
status: ResultStatus.ERROR,
rows: [],
errorMsg: error.body || error,
title:
indexPattern?.title !== searchSource.getDataFrame()?.name
? searchSource.getDataFrame()?.name
: indexPattern?.title,
});

console.log('error', error.body);

Check failure on line 235 in src/plugins/discover/public/application/view_components/utils/use_search.ts

View workflow job for this annotation

GitHub Actions / Build and Verify on Linux (ciGroup1)

Unexpected console statement
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,6 @@ export function TopNavMenu(props: TopNavMenuProps): ReactElement | null {
// Validate presence of all required fields
if (!showSearchBar || !props.data) return null;
const { SearchBar } = props.data.ui;
console.log('in top nav menu', props.data$);
return (
<SearchBar
{...searchBarProps}
Expand Down

0 comments on commit 4faa593

Please sign in to comment.