Skip to content

Commit

Permalink
[Maps] fix propType warnings for source with joins (elastic#48905) (e…
Browse files Browse the repository at this point in the history
…lastic#48940)

* [Maps] fix propType warnings for source with joins

* only accept arrays
  • Loading branch information
nreese authored Oct 22, 2019
1 parent 113bc2e commit 0a38bc6
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ MetricEditor.propTypes = {
field: PropTypes.string,
label: PropTypes.string,
}),
fields: PropTypes.object, // indexPattern.fields IndexedArray object
fields: PropTypes.array,
onChange: PropTypes.func.isRequired,
metricsFilter: PropTypes.func,
};
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ export function MetricsEditor({ fields, metrics, onChange, allowMultipleMetrics,

MetricsEditor.propTypes = {
metrics: PropTypes.array,
fields: PropTypes.object, // indexPattern.fields IndexedArray object
fields: PropTypes.array,
onChange: PropTypes.func.isRequired,
allowMultipleMetrics: PropTypes.bool,
metricsFilter: PropTypes.func,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,7 @@ export function SingleFieldSelect({ fields,

SingleFieldSelect.propTypes = {
placeholder: PropTypes.string,
fields: PropTypes.oneOfType([
PropTypes.object, // IndexedArray object
PropTypes.array // array of Field objects
]),
fields: PropTypes.array,
onChange: PropTypes.func.isRequired,
value: PropTypes.string, // fieldName
filterField: PropTypes.func,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ JoinExpression.propTypes = {

// Right field props
rightValue: PropTypes.string,
rightFields: PropTypes.object, // indexPattern.fields IndexedArray object
rightFields: PropTypes.array,
onRightFieldChange: PropTypes.func.isRequired,
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ export class MetricsExpression extends Component {

MetricsExpression.propTypes = {
metrics: PropTypes.array,
rightFields: PropTypes.object, // indexPattern.fields IndexedArray object
rightFields: PropTypes.array,
onChange: PropTypes.func.isRequired,
};

Expand Down

0 comments on commit 0a38bc6

Please sign in to comment.