Skip to content

Commit

Permalink
[Exploaratory View ] Styling: Fix duplicate labels for operation sele…
Browse files Browse the repository at this point in the history
…ct (#115936)

Co-authored-by: Kibana Machine <[email protected]>
  • Loading branch information
shahzad31 and kibanamachine authored Nov 1, 2021
1 parent 9e4bab3 commit 48a6585
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ export function OperationTypeSelect({
return (
<OperationTypeComponent
onChange={onChange}
showLabel={true}
operationType={operationType || defaultOperationType}
/>
);
Expand All @@ -42,11 +41,9 @@ export function OperationTypeSelect({
export function OperationTypeComponent({
operationType,
onChange,
showLabel = false,
}: {
operationType?: OperationType;
onChange: (value: OperationType) => void;
showLabel?: boolean;
}) {
const options = [
{
Expand Down Expand Up @@ -101,15 +98,7 @@ export function OperationTypeComponent({

return (
<EuiSuperSelect
compressed
fullWidth
prepend={
showLabel
? i18n.translate('xpack.observability.expView.operationType.label', {
defaultMessage: 'Calculation',
})
: undefined
}
data-test-subj="operationTypeSelect"
valueOfSelected={operationType}
options={options}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ export function ExpandedSeriesRow(seriesProps: Props) {
<EuiFormRow label={FILTERS_LABEL} fullWidth>
<SeriesFilter seriesConfig={seriesConfig} seriesId={seriesId} series={series} />
</EuiFormRow>
<EuiFlexGroup>
<EuiFlexItem grow={2}>
<EuiFlexGroup gutterSize="s">
<EuiFlexItem>
<EuiFormRow label={BREAKDOWN_BY_LABEL}>
<EuiFlexGroup gutterSize="xs">
<EuiFlexItem style={{ minWidth: 200 }}>
Expand All @@ -74,7 +74,7 @@ export function ExpandedSeriesRow(seriesProps: Props) {
</EuiFormRow>
</EuiFlexItem>
{(hasOperationType || (columnType === 'operation' && !hasPercentileBreakdown)) && (
<EuiFlexItem grow={1}>
<EuiFlexItem>
<EuiFormRow label={OPERATION_LABEL}>
<OperationTypeSelect
{...seriesProps}
Expand Down

0 comments on commit 48a6585

Please sign in to comment.