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
* [Maps] fix edit layer settings action showing when readonly

* remove unneeded file

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
  • Loading branch information
nreese and kibanamachine committed Aug 20, 2021
1 parent 302d885 commit f89dd92
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 f89dd92

Please sign in to comment.