Skip to content

Commit

Permalink
Fix index side bar width and index combobox. (#3043)
Browse files Browse the repository at this point in the history
  • Loading branch information
fmassot authored Mar 17, 2023
1 parent c039c68 commit d4be690
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion quickwit/quickwit-ui/src/components/IndexSideBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ const IndexBarWrapper = styled('div')({
display: 'flex',
height: '100%',
flex: '0 0 260px',
maxWidth: '260px',
flexDirection: 'column',
borderRight: '1px solid rgba(0, 0, 0, 0.12)',
});
Expand Down Expand Up @@ -152,7 +153,7 @@ export function IndexSideBar(props: IndexMetadataProps) {
{open ? <KeyboardArrowDown /> : <ChevronRight />}
</IconButton>
Fields
{ open && <List dense={true} sx={{paddingTop: '0'}}>
{ open && <List dense={true} sx={{paddingTop: '0', overflowWrap: 'break-word'}}>
{ fields.map(function(field) {
return <ListItem
key={ field.json_path }
Expand Down
6 changes: 4 additions & 2 deletions quickwit/quickwit-ui/src/views/SearchView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ function updateSearchRequestWithIndex(index: Index | null, searchRequest: Search
searchRequest.startTimestamp = null;
searchRequest.endTimestamp = null;
}
if (index?.metadata.index_config.index_id) {
searchRequest.indexId = index?.metadata.index_config.index_id;
}
}

function SearchView() {
Expand All @@ -66,8 +69,8 @@ function SearchView() {
setSearchRequest(updatedSearchRequest);
setQueryRunning(true);
setSearchError(null);
navigate('/search?' + toUrlSearchRequestParams(updatedSearchRequest).toString());
quickwitClient.search(updatedSearchRequest).then((response) => {
navigate('/search?' + toUrlSearchRequestParams(updatedSearchRequest).toString());
updateLastSearchRequest(updatedSearchRequest);
setSearchResponse(response);
setQueryRunning(false);
Expand All @@ -80,7 +83,6 @@ function SearchView() {
const onIndexMetadataUpdate = (indexMetadata: IndexMetadata | null) => {
setSearchRequest(previousRequest => {
updateSearchRequestWithIndex(index, previousRequest);
setSearchRequest(previousRequest);
return {...previousRequest, indexId: indexMetadata === null ? null : indexMetadata.index_config.index_id};
});
}
Expand Down

0 comments on commit d4be690

Please sign in to comment.