X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/cfd501bed1fb431e74816069f0ae8f83aacf29c7..79e636fa713d11b4b7188985e78c8ff1c094d9a0:/src/views-components/search-bar/search-bar-view.tsx?ds=sidebyside diff --git a/src/views-components/search-bar/search-bar-view.tsx b/src/views-components/search-bar/search-bar-view.tsx index ff4b6442f8..09b75bbf65 100644 --- a/src/views-components/search-bar/search-bar-view.tsx +++ b/src/views-components/search-bar/search-bar-view.tsx @@ -156,56 +156,17 @@ export const SearchBarView = withStyles(styles)( className={isPopoverOpen ? classes.containerSearchViewOpened : classes.container}>
- handleInputClick(e, props)} - onKeyDown={e => handleKeyDown(e, props)} - startAdornment={ - - - - - - - - } - endAdornment={ - - - handleDropdownClick(e, props)}> - - - - - } /> +
- - {getView({ ...props })} - + + { + getView({ ...props }) + } + ); } @@ -218,6 +179,63 @@ export const SearchBarView = withStyles(styles)( ); +const SearchInput = (props: SearchBarViewProps) => { + const { classes } = props; + return handleInputClick(e, props)} + onKeyDown={e => handleKeyDown(e, props)} + startAdornment={ + + + + + + + + } + endAdornment={ + + + handleDropdownClick(e, props)}> + + + + + } />; +}; + +const SearchViewContainer = (props: SearchBarViewProps & { width: number, anchorEl: HTMLElement | null, children: React.ReactNode }) => + + { + props.children + } + ; + + const getView = (props: SearchBarViewProps) => { switch (props.currentView) { case SearchView.AUTOCOMPLETE: