Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Lens] Split up dimension panel code #80423

Merged
merged 9 commits into from
Oct 19, 2020
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,5 @@ export const {
sortByField,
hasField,
updateLayerIndexPattern,
mergeLayer,
} = actual;
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,16 @@ import {
EuiListGroupItemProps,
EuiFormLabel,
} from '@elastic/eui';
import { IndexPatternDimensionEditorProps, OperationSupportMatrix } from './dimension_panel';
import { IndexPatternDimensionEditorProps } from './dimension_panel';
import { OperationSupportMatrix } from './operation_support';
import { IndexPatternColumn, OperationType } from '../indexpattern';
import {
operationDefinitionMap,
getOperationDisplay,
buildColumn,
changeField,
} from '../operations';
import { deleteColumn, changeColumn, updateColumnParam } from '../state_helpers';
import { deleteColumn, changeColumn, updateColumnParam, mergeLayer } from '../state_helpers';
import { FieldSelect } from './field_select';
import { hasField, fieldIsInvalid } from '../utils';
import { BucketNestingEditor } from './bucket_nesting_editor';
Expand Down Expand Up @@ -394,12 +395,11 @@ export function DimensionEditor(props: DimensionEditorProps) {
<LabelInput
value={selectedColumn.label}
onChange={(value) => {
setState({
...state,
layers: {
...state.layers,
[layerId]: {
...state.layers[layerId],
setState(
mergeLayer({
state,
layerId,
newLayer: {
columns: {
...state.layers[layerId].columns,
[columnId]: {
Expand All @@ -409,8 +409,8 @@ export function DimensionEditor(props: DimensionEditorProps) {
},
},
},
},
});
})
);
}}
/>
)}
Expand Down
Loading