Search: Fix overflow issue with folder view (#49723)

This commit is contained in:
kay delaney 2022-05-30 10:31:42 +01:00 committed by GitHub
parent 5f6b23e45a
commit 17d0133008
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 3 deletions

View File

@ -22,12 +22,12 @@ export interface Props {
export default function DashboardSearch({ onCloseSearch }: Props) {
if (config.featureToggles.panelTitleSearch) {
// TODO: "folder:current" ????
return <DashbaordSearchNEW onCloseSearch={onCloseSearch} />;
return <DashboardSearchNew onCloseSearch={onCloseSearch} />;
}
return <DashboardSearchOLD onCloseSearch={onCloseSearch} />;
}
function DashbaordSearchNEW({ onCloseSearch }: Props) {
function DashboardSearchNew({ onCloseSearch }: Props) {
const styles = useStyles2(getStyles);
const { query, onQueryChange } = useSearchQuery({});
@ -137,6 +137,8 @@ const getStyles = stylesFactory((theme: GrafanaTheme2) => {
}
`,
container: css`
display: flex;
flex-direction: column;
max-width: 1400px;
margin: 0 auto;
padding: ${theme.spacing(2)};
@ -162,6 +164,7 @@ const getStyles = stylesFactory((theme: GrafanaTheme2) => {
search: css`
display: flex;
flex-direction: column;
overflow: hidden;
height: 100%;
padding: ${theme.spacing(2, 0, 3, 0)};
`,

View File

@ -108,7 +108,10 @@ const getStyles = (theme: GrafanaTheme2) => {
display: flex;
flex-direction: column;
background: ${theme.v1.colors.panelBg};
&:not(:last-child) {
border-bottom: solid 1px ${theme.v1.colors.border2};
}
`,
sectionItems: css`
margin: 0 24px 0 32px;