Skip to content

Commit

Permalink
rename isInvalid prop to invalid prop
Browse files Browse the repository at this point in the history
  • Loading branch information
juandjara committed Mar 5, 2024
1 parent 045ab22 commit 577f90f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/react-redux/src/slices/cartoSlice.js
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@ export const selectSpatialFilter = (state, sourceId) => {
*/
export const selectValidSpatialFilter = (state, sourceId) => {
const spatialFilter = selectSpatialFilter(state, sourceId);
return spatialFilter?.properties?.isInvalid ? null : spatialFilter;
return spatialFilter?.properties?.invalid ? null : spatialFilter;
};

/**
Expand Down
4 changes: 2 additions & 2 deletions packages/react-widgets/src/layers/FeatureSelectionLayer.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ export default function FeatureSelectionLayer(
if (hasGeometry && !isSelected) {
mainColor = secondaryAsRgba;
}
if (spatialFilterGeometry?.properties?.isInvalid) {
if (spatialFilterGeometry?.properties?.invalid) {
mainColor = errorAsRgba;
}

Expand Down Expand Up @@ -101,7 +101,7 @@ export default function FeatureSelectionLayer(
if (updatedData.features.length !== 0 && !editType.includes('Tentative')) {
const [lastFeature] = updatedData.features.slice(-1);
const intersectionPoints = kinks(lastFeature).features.length;
lastFeature.properties.isInvalid = intersectionPoints > 0;
lastFeature.properties.invalid = intersectionPoints > 0;

if (lastFeature) {
dispatch(
Expand Down

0 comments on commit 577f90f

Please sign in to comment.