Skip to content

Commit

Permalink
[Maps] fix edit layer settings action showing when readonly (#109321) (
Browse files Browse the repository at this point in the history
…#109433)

* [Maps] fix edit layer settings action showing when readonly

* remove unneeded file

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

Co-authored-by: Nathan Reese <reese.nathan@gmail.com>
  • Loading branch information
kibanamachine and nreese committed Aug 20, 2021
1 parent 61a993b commit 887bd66
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 22 deletions.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -174,19 +174,19 @@ export class TOCEntryActionsPopover extends Component<Props, State> {
},
});
}
actionItems.push({
disabled: this.props.isEditButtonDisabled,
name: EDIT_LAYER_SETTINGS_LABEL,
icon: <EuiIcon type="pencil" size="m" />,
'data-test-subj': 'layerSettingsButton',
toolTipContent: null,
onClick: () => {
this._closePopover();
this.props.openLayerSettings();
},
});

if (!this.props.isReadOnly) {
actionItems.push({
disabled: this.props.isEditButtonDisabled,
name: EDIT_LAYER_SETTINGS_LABEL,
icon: <EuiIcon type="pencil" size="m" />,
'data-test-subj': 'layerSettingsButton',
toolTipContent: null,
onClick: () => {
this._closePopover();
this.props.openLayerSettings();
},
});
if (this.state.supportsFeatureEditing) {
actionItems.push({
name: EDIT_FEATURES_LABEL,
Expand Down

0 comments on commit 887bd66

Please sign in to comment.