mirror of
https://github.com/grafana/grafana.git
synced 2025-08-02 06:12:59 +08:00
Prometheus: Enable Combobox metric select by default (#101045)
* Prometheus: enable prometheusUsesCombobox toggle by default * bold Combobox
This commit is contained in:
@ -57,6 +57,8 @@ export interface ComboboxBaseProps<T extends string | number>
|
||||
* */
|
||||
width?: number | 'auto';
|
||||
|
||||
['data-testid']?: string;
|
||||
|
||||
/**
|
||||
* Called when the input loses focus.
|
||||
*/
|
||||
@ -120,6 +122,7 @@ export const Combobox = <T extends string | number>(props: ComboboxProps<T>) =>
|
||||
minWidth,
|
||||
maxWidth,
|
||||
'aria-labelledby': ariaLabelledBy,
|
||||
'data-testid': dataTestId,
|
||||
autoFocus,
|
||||
onBlur,
|
||||
disabled,
|
||||
@ -359,6 +362,7 @@ export const Combobox = <T extends string | number>(props: ComboboxProps<T>) =>
|
||||
onChange: noop, // Empty onCall to avoid TS error https://github.com/downshift-js/downshift/issues/718
|
||||
'aria-labelledby': ariaLabelledBy, // Label should be handled with the Field component
|
||||
placeholder,
|
||||
'data-testid': dataTestId,
|
||||
})}
|
||||
/>
|
||||
<Portal>
|
||||
|
@ -50,6 +50,7 @@ export const AutoSizeInput = React.forwardRef<HTMLInputElement, Props>((props, r
|
||||
return (
|
||||
<AutoSizeInputContext.Provider value={true}>
|
||||
<Input
|
||||
data-testid="autosize-input" // consumer should override default testid
|
||||
{...restProps}
|
||||
placeholder={placeholder}
|
||||
ref={ref}
|
||||
@ -76,7 +77,6 @@ export const AutoSizeInput = React.forwardRef<HTMLInputElement, Props>((props, r
|
||||
onCommitChange(event);
|
||||
}
|
||||
}}
|
||||
data-testid="autosize-input"
|
||||
/>
|
||||
</AutoSizeInputContext.Provider>
|
||||
);
|
||||
|
Reference in New Issue
Block a user