Skip to content

Commit

Permalink
Fixes duplicate 'Value' options in math function select (#25556) (#25567
Browse files Browse the repository at this point in the history
)
  • Loading branch information
cqliu1 authored Nov 13, 2018
1 parent 0da5b2c commit 57618ae
Showing 1 changed file with 12 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,19 @@ import React from 'react';
import PropTypes from 'prop-types';
import { EuiSelect } from '@elastic/eui';

const options = [
{ text: 'Average', value: 'mean' },
{ text: 'Count', value: 'size' },
{ text: 'First', value: 'first' },
{ text: 'Last', value: 'last' },
{ text: 'Max', value: 'max' },
{ text: 'Median', value: 'median' },
{ text: 'Min', value: 'min' },
{ text: 'Sum', value: 'sum' },
{ text: 'Unique', value: 'unique' },
];

export const SimpleMathFunction = ({ onChange, value, inputRef, onlymath }) => {
const options = [
{ text: 'Average', value: 'mean' },
{ text: 'Count', value: 'size' },
{ text: 'First', value: 'first' },
{ text: 'Last', value: 'last' },
{ text: 'Max', value: 'max' },
{ text: 'Median', value: 'median' },
{ text: 'Min', value: 'min' },
{ text: 'Sum', value: 'sum' },
{ text: 'Unique', value: 'unique' },
];

if (!onlymath) options.unshift({ text: 'Value', value: '' });

return (
Expand Down

0 comments on commit 57618ae

Please sign in to comment.