mirror of
https://github.com/prometheus/prometheus.git
synced 2025-03-05 20:59:13 -08:00
fix: Wrap text in CodeMirror expression editor (#8665)
Fixes https://github.com/prometheus/prometheus/issues/8663 Signed-off-by: Julius Volz <julius.volz@gmail.com>
This commit is contained in:
parent
49559380eb
commit
2043c60f11
|
@ -32,8 +32,11 @@ input[type='checkbox']:checked + label {
|
||||||
text-transform: capitalize;
|
text-transform: capitalize;
|
||||||
}
|
}
|
||||||
|
|
||||||
.expression-input {
|
/* Using a more specific selector here to be able to override Bootstrap's default input group styles. */
|
||||||
|
.input-group.expression-input {
|
||||||
margin-bottom: 10px;
|
margin-bottom: 10px;
|
||||||
|
/* Prevent the input group from wrapping around when the editor content is too long for a line. */
|
||||||
|
flex-wrap: nowrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
.expression-input .cm-expression-input {
|
.expression-input .cm-expression-input {
|
||||||
|
|
|
@ -128,6 +128,7 @@ const CMExpressionInput: FC<CMExpressionInputProps> = ({
|
||||||
closeBrackets(),
|
closeBrackets(),
|
||||||
autocompletion(),
|
autocompletion(),
|
||||||
highlightSelectionMatches(),
|
highlightSelectionMatches(),
|
||||||
|
EditorView.lineWrapping,
|
||||||
keymap.of([
|
keymap.of([
|
||||||
...closeBracketsKeymap,
|
...closeBracketsKeymap,
|
||||||
...defaultKeymap,
|
...defaultKeymap,
|
||||||
|
|
Loading…
Reference in a new issue