Select: Portal menu by default (#48176)

* Remove menuShouldPortal from all <Select /> components

* fix unit tests

* leave menuShouldPortal as an escape hatch

* Fix import order
This commit is contained in:
Ashley Harrison
2022-05-04 15:12:59 +01:00
committed by GitHub
parent 2738d1c557
commit 06d3c27bc1
179 changed files with 67 additions and 372 deletions

View File

@@ -236,7 +236,6 @@ export class ConfigEditor extends PureComponent<Props, State> {
</InlineFormLabel>
<Select
inputId={`${htmlPrefix}-http-method`}
menuShouldPortal
className="width-10"
value={httpModes.find((httpMode) => httpMode.value === options.jsonData.httpMode)}
options={httpModes}
@@ -280,7 +279,6 @@ export class ConfigEditor extends PureComponent<Props, State> {
<div className="gf-form">
<Select
aria-label="Query language"
menuShouldPortal
className="width-30"
value={options.jsonData.version === InfluxVersion.Flux ? versions[1] : versions[0]}
options={versions}

View File

@@ -51,7 +51,6 @@ export const RawInfluxQLEditor = ({ query, onChange, onRunQuery }: Props): JSX.E
<HorizontalGroup>
<InlineFormLabel htmlFor={selectElementId}>Format as</InlineFormLabel>
<Select
menuShouldPortal
inputId={selectElementId}
onChange={(v) => {
onChange({ ...query, resultFormat: v.value });

View File

@@ -78,7 +78,6 @@ const SelReload = ({ loadOptions, allowCustomValue, onChange, onClose }: SelRelo
return (
<div className={selectClass}>
<AsyncSelect
menuShouldPortal
formatCreateLabel={formatCreateLabel}
defaultOptions
autoFocus
@@ -109,7 +108,6 @@ const SelSingleLoad = ({ loadOptions, allowCustomValue, onChange, onClose }: Sel
return (
<div className={selectClass}>
<Select
menuShouldPortal
isLoading={loadState.loading}
formatCreateLabel={formatCreateLabel}
autoFocus

View File

@@ -26,7 +26,6 @@ exports[`Render should disable basic auth password input 1`] = `
"value": "InfluxQL",
}
}
menuShouldPortal={true}
onChange={[Function]}
options={
Array [
@@ -198,7 +197,6 @@ exports[`Render should disable basic auth password input 1`] = `
className="width-10"
defaultValue="POST"
inputId="influxdb-config42-http-method"
menuShouldPortal={true}
onChange={[Function]}
options={
Array [
@@ -293,7 +291,6 @@ exports[`Render should hide basic auth fields when switch off 1`] = `
"value": "InfluxQL",
}
}
menuShouldPortal={true}
onChange={[Function]}
options={
Array [
@@ -465,7 +462,6 @@ exports[`Render should hide basic auth fields when switch off 1`] = `
className="width-10"
defaultValue="POST"
inputId="influxdb-config42-http-method"
menuShouldPortal={true}
onChange={[Function]}
options={
Array [
@@ -560,7 +556,6 @@ exports[`Render should hide white listed cookies input when browser access chose
"value": "InfluxQL",
}
}
menuShouldPortal={true}
onChange={[Function]}
options={
Array [
@@ -732,7 +727,6 @@ exports[`Render should hide white listed cookies input when browser access chose
className="width-10"
defaultValue="POST"
inputId="influxdb-config42-http-method"
menuShouldPortal={true}
onChange={[Function]}
options={
Array [
@@ -827,7 +821,6 @@ exports[`Render should render component 1`] = `
"value": "InfluxQL",
}
}
menuShouldPortal={true}
onChange={[Function]}
options={
Array [
@@ -999,7 +992,6 @@ exports[`Render should render component 1`] = `
className="width-10"
defaultValue="POST"
inputId="influxdb-config42-http-method"
menuShouldPortal={true}
onChange={[Function]}
options={
Array [