Skip to content

Commit

Permalink
Prop rename: filterData to _filterData
Browse files Browse the repository at this point in the history
  • Loading branch information
1chandu committed Dec 10, 2019
1 parent 6d7f5fd commit 5752e1d
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 18 deletions.
Expand Up @@ -66,7 +66,7 @@ const defaultProps = {
material: defaultMaterial,

// data filter
filterData: {type: 'function', value: null, optional: true}
_filterData: {type: 'function', value: null, optional: true}
};

export default class CPUGridLayer extends CompositeLayer {
Expand Down
Expand Up @@ -64,7 +64,7 @@ const defaultProps = {
material: defaultMaterial,

// data filter
filterData: {type: 'function', value: null, optional: true}
_filterData: {type: 'function', value: null, optional: true}
};

export default class HexagonLayer extends CompositeLayer {
Expand Down
10 changes: 5 additions & 5 deletions modules/aggregation-layers/src/utils/cpu-aggregator.js
Expand Up @@ -43,8 +43,8 @@ const defaultDimensions = [
prop: 'colorAggregation'
},
filterData: {
prop: 'filterData',
updateTrigger: 'filterData'
prop: '_filterData',
updateTrigger: '_filterData'
}
}
},
Expand Down Expand Up @@ -90,8 +90,8 @@ const defaultDimensions = [
prop: 'elevationAggregation'
},
filterData: {
prop: 'filterData',
updateTrigger: 'filterData'
prop: '_filterData',
updateTrigger: '_filterData'
}
}
},
Expand Down Expand Up @@ -378,7 +378,7 @@ export default class CPUAggregator {

const sortedBins = new BinSorter(this.state.layerData.data || [], {
getValue,
filterData: props.filterData
filterData: props._filterData
});
this.setDimensionState(key, {sortedBins});
this.getDimensionValueDomain(props, dimensionUpdater);
Expand Down
Expand Up @@ -152,7 +152,7 @@ test('CPUGridLayer#updates', t => {
}
}
};
return assertStateUpdate(shouldUpdate, 'filterData');
return assertStateUpdate(shouldUpdate, '_filterData');
}
function getChecksForPositionChange(triggerChange) {
const shouldUpdate = {
Expand Down Expand Up @@ -331,7 +331,7 @@ test('CPUGridLayer#updates', t => {
},
{
updateProps: {
filterData: pt => pt.SPACES >= 4 && pt.SPACES <= 10
_filterData: pt => pt.SPACES >= 4 && pt.SPACES <= 10
},
onAfterUpdate: ({layer, oldState}) => {
getChecksForFilterChange(false)({layer, oldState});
Expand All @@ -344,9 +344,9 @@ test('CPUGridLayer#updates', t => {
},
{
updateProps: {
filterData: pt => pt.SPACES >= 4 && pt.SPACES <= 10,
_filterData: pt => pt.SPACES >= 4 && pt.SPACES <= 10,
updateTriggers: {
filterData: 1
_filterData: 1
}
},
onAfterUpdate: ({layer, oldState}) => {
Expand Down Expand Up @@ -375,9 +375,9 @@ test('CPUGridLayer#updates', t => {
},
{
updateProps: {
filterData: null,
_filterData: null,
updateTriggers: {
filterData: 0
_filterData: 0
}
},
onAfterUpdate: ({layer, oldState}) => {
Expand Down
10 changes: 5 additions & 5 deletions test/modules/aggregation-layers/hexagon-layer.spec.js
Expand Up @@ -307,7 +307,7 @@ test('HexagonLayer#updateLayer', t => {
},
{
updateProps: {
filterData: pt => pt.SPACES >= 4 && pt.SPACES <= 10
_filterData: pt => pt.SPACES >= 4 && pt.SPACES <= 10
},
onAfterUpdate: ({layer, oldState}) => {
getChecksForFilterChange(false)({layer, oldState});
Expand All @@ -320,9 +320,9 @@ test('HexagonLayer#updateLayer', t => {
},
{
updateProps: {
filterData: pt => pt.SPACES >= 4 && pt.SPACES <= 10,
_filterData: pt => pt.SPACES >= 4 && pt.SPACES <= 10,
updateTriggers: {
filterData: 1
_filterData: 1
}
},
onAfterUpdate: ({layer, oldState}) => {
Expand Down Expand Up @@ -351,9 +351,9 @@ test('HexagonLayer#updateLayer', t => {
},
{
updateProps: {
filterData: null,
_filterData: null,
updateTriggers: {
filterData: 0
_filterData: 0
}
},
onAfterUpdate: ({layer, oldState}) => {
Expand Down

0 comments on commit 5752e1d

Please sign in to comment.