mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
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:
@@ -89,13 +89,7 @@ export const LinkSettingsEdit: React.FC<LinkSettingsEditProps> = ({ editLinkIdx,
|
||||
<Input name="title" id="title" value={linkSettings.title} onChange={onChange} autoFocus={isNew} />
|
||||
</Field>
|
||||
<Field label="Type">
|
||||
<Select
|
||||
inputId="link-type-input"
|
||||
value={linkSettings.type}
|
||||
options={linkTypeOptions}
|
||||
onChange={onTypeChange}
|
||||
menuShouldPortal
|
||||
/>
|
||||
<Select inputId="link-type-input" value={linkSettings.type} options={linkTypeOptions} onChange={onTypeChange} />
|
||||
</Field>
|
||||
{linkSettings.type === 'dashboards' && (
|
||||
<>
|
||||
@@ -113,7 +107,7 @@ export const LinkSettingsEdit: React.FC<LinkSettingsEditProps> = ({ editLinkIdx,
|
||||
<Input name="tooltip" value={linkSettings.tooltip} onChange={onChange} placeholder="Open dashboard" />
|
||||
</Field>
|
||||
<Field label="Icon">
|
||||
<Select menuShouldPortal value={linkSettings.icon} options={linkIconOptions} onChange={onIconChange} />
|
||||
<Select value={linkSettings.icon} options={linkIconOptions} onChange={onIconChange} />
|
||||
</Field>
|
||||
</>
|
||||
)}
|
||||
|
||||
@@ -138,7 +138,6 @@ export function getPanelFrameCategory(props: OptionPaneRenderProps): OptionsPane
|
||||
const maxPerRowOptions = [2, 3, 4, 6, 8, 12].map((value) => ({ label: value.toString(), value }));
|
||||
return (
|
||||
<Select
|
||||
menuShouldPortal
|
||||
options={maxPerRowOptions}
|
||||
value={panel.maxPerRow}
|
||||
onChange={(value) => onPanelConfigChange('maxPerRow', value.value)}
|
||||
|
||||
@@ -40,5 +40,5 @@ export const RepeatRowSelect: FC<Props> = ({ repeat, onChange, id }) => {
|
||||
|
||||
const onSelectChange = useCallback((option: SelectableValue<string | null>) => onChange(option.value!), [onChange]);
|
||||
|
||||
return <Select inputId={id} menuShouldPortal value={repeat} onChange={onSelectChange} options={variableOptions} />;
|
||||
return <Select inputId={id} value={repeat} onChange={onSelectChange} options={variableOptions} />;
|
||||
};
|
||||
|
||||
@@ -222,7 +222,6 @@ export class ShareSnapshot extends PureComponent<Props, State> {
|
||||
<Field label="Expire">
|
||||
<Select
|
||||
inputId="expire-select-input"
|
||||
menuShouldPortal
|
||||
width={30}
|
||||
options={expireOptions}
|
||||
value={selectedExpireOption}
|
||||
|
||||
Reference in New Issue
Block a user