Skip to content

Commit 602324c

Browse files
Merge pull request #571 from plotly/dont-prepopulate-transforms
add non-equals for filters; do not prepopulate transforms
2 parents 4db788c + d30e839 commit 602324c

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

src/components/containers/TransformAccordion.js

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ class TransformAccordion extends Component {
1515
fullContainer: {transforms = []},
1616
localize: _,
1717
container,
18-
dataSources,
1918
dataSourceOptions,
2019
} = this.context;
2120
const {children} = this.props;
@@ -97,12 +96,11 @@ class TransformAccordion extends Component {
9796
const key = `transforms[${transformIndex}]`;
9897

9998
const payload = {type};
100-
const firstDataSource = dataSourceOptions[0].value;
10199
if (type === 'filter') {
102-
payload.targetsrc = firstDataSource;
100+
payload.targetsrc = null;
103101
} else {
104-
payload.groupssrc = firstDataSource;
105-
payload.groups = dataSources[firstDataSource];
102+
payload.groupssrc = null;
103+
payload.groups = null;
106104
}
107105

108106
updateContainer({[key]: payload});
@@ -125,7 +123,6 @@ TransformAccordion.contextTypes = {
125123
localize: PropTypes.func,
126124
container: PropTypes.object,
127125
dataSourceOptions: PropTypes.array,
128-
dataSources: PropTypes.object,
129126
};
130127

131128
TransformAccordion.propTypes = {

src/components/fields/FilterOperation.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ const operators = [
3030

3131
const operations = {
3232
inequality: [
33+
{value: '!=', label: 'Target ≠ Reference'},
3334
{value: '<', label: 'Target < Reference'},
3435
{value: '<=', label: 'Target ≤ Reference'},
3536
{value: '=', label: 'Target = Reference'},

0 commit comments

Comments
 (0)