mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 09:19:04 -04:00
dashboard Reset button disable (#159430)
Disables reset button on title and description when they are the same as default.
This commit is contained in:
parent
f4e79d69b4
commit
1349d0af86
1 changed files with 8 additions and 2 deletions
|
@ -126,7 +126,9 @@ export const CustomizePanelEditor = (props: CustomizePanelProps) => {
|
|||
size="xs"
|
||||
data-test-subj="resetCustomEmbeddablePanelTitleButton"
|
||||
onClick={() => setPanelTitle(embeddable.getOutput().defaultTitle)}
|
||||
disabled={hideTitle || !editMode}
|
||||
disabled={
|
||||
hideTitle || !editMode || embeddable.getOutput().defaultTitle === panelTitle
|
||||
}
|
||||
aria-label={i18n.translate(
|
||||
'embeddableApi.customizePanel.flyout.optionsMenuForm.resetCustomTitleButtonAriaLabel',
|
||||
{
|
||||
|
@ -172,7 +174,11 @@ export const CustomizePanelEditor = (props: CustomizePanelProps) => {
|
|||
onClick={() => {
|
||||
setPanelDescription(embeddable.getOutput().defaultDescription);
|
||||
}}
|
||||
disabled={hideTitle || !editMode}
|
||||
disabled={
|
||||
hideTitle ||
|
||||
!editMode ||
|
||||
embeddable.getOutput().defaultDescription === panelDescription
|
||||
}
|
||||
aria-label={i18n.translate(
|
||||
'embeddableApi.customizePanel.flyout.optionsMenuForm.resetCustomDescriptionButtonAriaLabel',
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue