Skip to content

Commit

Permalink
Add additional error message
Browse files Browse the repository at this point in the history
  • Loading branch information
wylieconlon committed Sep 24, 2020
1 parent 7d59c70 commit 454afc2
Showing 1 changed file with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -281,10 +281,14 @@ export function DimensionEditor(props: DimensionEditorProps) {
fullWidth
isInvalid={Boolean(incompatibleSelectedOperationType)}
error={
selectedColumn
? i18n.translate('xpack.lens.indexPattern.invalidOperationLabel', {
defaultMessage: 'To use this function, select a different field.',
})
selectedColumn && incompatibleSelectedOperationType
? selectedOperationDefinition?.input === 'field'
? i18n.translate('xpack.lens.indexPattern.invalidOperationLabel', {
defaultMessage: 'To use this function, select a different field.',
})
: i18n.translate('xpack.lens.indexPattern.chooseFieldLabel', {
defaultMessage: 'To use this function, select a field.',
})
: undefined
}
>
Expand Down

0 comments on commit 454afc2

Please sign in to comment.