[Maps] fix edit layer settings action showing when readonly (#109321)
* [Maps] fix edit layer settings action showing when readonly * remove unneeded file Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
This commit is contained in:
parent
ca6bb4b6d1
commit
c635216a6c
|
@ -535,17 +535,6 @@ exports[`TOCEntryActionsPopover should not show edit actions in read only mode 1
|
|||
"onClick": [Function],
|
||||
"toolTipContent": null,
|
||||
},
|
||||
Object {
|
||||
"data-test-subj": "layerSettingsButton",
|
||||
"disabled": false,
|
||||
"icon": <EuiIcon
|
||||
size="m"
|
||||
type="pencil"
|
||||
/>,
|
||||
"name": "Edit layer settings",
|
||||
"onClick": [Function],
|
||||
"toolTipContent": null,
|
||||
},
|
||||
],
|
||||
"title": "Layer actions",
|
||||
},
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue