mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 01:38:56 -04:00
parent
11520d46bb
commit
c2fbeb8979
2 changed files with 56 additions and 44 deletions
|
@ -81,40 +81,46 @@ function ExtendedBoundsParamEditor({
|
|||
error={error}
|
||||
compressed
|
||||
>
|
||||
<EuiFlexGroup gutterSize="s">
|
||||
<EuiFlexItem>
|
||||
<EuiFieldNumber
|
||||
value={isUndefined(value.min) ? '' : value.min}
|
||||
onChange={ev => handleChange(ev, 'min')}
|
||||
onBlur={setTouched}
|
||||
fullWidth={true}
|
||||
isInvalid={showValidation ? !isValid : false}
|
||||
aria-label={minLabel}
|
||||
prepend={
|
||||
<EuiText size="xs">
|
||||
<strong>{minLabel}</strong>
|
||||
</EuiText>
|
||||
}
|
||||
compressed
|
||||
/>
|
||||
</EuiFlexItem>
|
||||
<EuiFlexItem>
|
||||
<EuiFieldNumber
|
||||
value={isUndefined(value.max) ? '' : value.max}
|
||||
onChange={ev => handleChange(ev, 'max')}
|
||||
onBlur={setTouched}
|
||||
fullWidth={true}
|
||||
isInvalid={showValidation ? !isValid : false}
|
||||
aria-label={maxLabel}
|
||||
prepend={
|
||||
<EuiText size="xs">
|
||||
<strong>{maxLabel}</strong>
|
||||
</EuiText>
|
||||
}
|
||||
compressed
|
||||
/>
|
||||
</EuiFlexItem>
|
||||
</EuiFlexGroup>
|
||||
<>
|
||||
{/*
|
||||
We have to put it into React.Fragment to avoid errors:
|
||||
EuiFormRow will try to put "compressed" as attribute into a EuiFlexGroup div
|
||||
*/}
|
||||
<EuiFlexGroup gutterSize="s">
|
||||
<EuiFlexItem>
|
||||
<EuiFieldNumber
|
||||
value={isUndefined(value.min) ? '' : value.min}
|
||||
onChange={ev => handleChange(ev, 'min')}
|
||||
onBlur={setTouched}
|
||||
fullWidth={true}
|
||||
isInvalid={showValidation ? !isValid : false}
|
||||
aria-label={minLabel}
|
||||
prepend={
|
||||
<EuiText size="xs">
|
||||
<strong>{minLabel}</strong>
|
||||
</EuiText>
|
||||
}
|
||||
compressed
|
||||
/>
|
||||
</EuiFlexItem>
|
||||
<EuiFlexItem>
|
||||
<EuiFieldNumber
|
||||
value={isUndefined(value.max) ? '' : value.max}
|
||||
onChange={ev => handleChange(ev, 'max')}
|
||||
onBlur={setTouched}
|
||||
fullWidth={true}
|
||||
isInvalid={showValidation ? !isValid : false}
|
||||
aria-label={maxLabel}
|
||||
prepend={
|
||||
<EuiText size="xs">
|
||||
<strong>{maxLabel}</strong>
|
||||
</EuiText>
|
||||
}
|
||||
compressed
|
||||
/>
|
||||
</EuiFlexItem>
|
||||
</EuiFlexGroup>
|
||||
</>
|
||||
</EuiFormRow>
|
||||
);
|
||||
}
|
||||
|
|
|
@ -47,16 +47,22 @@ function RowsOrColumnsControl({ aggParams, setValue }: AggControlProps<boolean>)
|
|||
|
||||
return (
|
||||
<EuiFormRow compressed fullWidth={true} className="visEditorSidebar__aggParamFormRow">
|
||||
<EuiButtonGroup
|
||||
data-test-subj="visEditorSplitBy"
|
||||
legend={i18n.translate('common.ui.vis.defaultEditor.controls.splitByLegend', {
|
||||
defaultMessage: 'Split chart by rows or columns.',
|
||||
})}
|
||||
options={options}
|
||||
isFullWidth={true}
|
||||
idSelected={idSelected}
|
||||
onChange={optionId => setValue(aggParams, PARAMS.NAME, optionId === PARAMS.ROWS)}
|
||||
/>
|
||||
<>
|
||||
{/*
|
||||
We have to put it into React.Fragment to avoid errors:
|
||||
EuiFormRow will try to put "compressed" as attribute into a EuiButtonGroup div
|
||||
*/}
|
||||
<EuiButtonGroup
|
||||
data-test-subj="visEditorSplitBy"
|
||||
legend={i18n.translate('common.ui.vis.defaultEditor.controls.splitByLegend', {
|
||||
defaultMessage: 'Split chart by rows or columns.',
|
||||
})}
|
||||
options={options}
|
||||
isFullWidth={true}
|
||||
idSelected={idSelected}
|
||||
onChange={optionId => setValue(aggParams, PARAMS.NAME, optionId === PARAMS.ROWS)}
|
||||
/>
|
||||
</>
|
||||
</EuiFormRow>
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue