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

[Bug] Disable layer copy when layer is invalid #1882

Merged

Conversation

jwasilgeo
Copy link
Collaborator

@jwasilgeo jwasilgeo commented Jul 27, 2022

  • add allowDuplicate prop to layer header
  • disable duplicate if layer is not valid

heshan0131 and others added 2 commits July 26, 2022 20:57
Signed-off-by: Jacob Wasilkowski <jwasilkowski@foursquare.com>
Signed-off-by: Jacob Wasilkowski <jwasilkowski@foursquare.com>
@@ -140,6 +140,7 @@ function LayerPanelFactory(
const {layer, datasets, isDraggable, layerTypeOptions} = this.props;
const {config} = layer;
const {isConfigActive} = config;
const allowDuplicate = typeof layer.isValidToSave === 'function' && layer.isValidToSave();
Copy link
Collaborator Author

@jwasilgeo jwasilgeo Jul 27, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Originally via upstreaming this line was

const allowDuplicate = typeof layer.isValidToSave === 'function' && layer.isValidToSave() && isValid;

but isValid now doesn't exist on the layer type definition. @heshan0131 do you think this diff will work as intended?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

make a note in [feat] Disable a layer after an error in Deck (#180) to address it when cherrypick

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jwasilgeo jwasilgeo marked this pull request as ready for review July 27, 2022 02:15
@jwasilgeo jwasilgeo merged commit 6c99bb0 into master Jul 28, 2022
@delete-merged-branch delete-merged-branch bot deleted the jw/upstream-disable-layer-copy-when-layer-is-invalid branch July 28, 2022 21:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants