Skip to content

Commit

Permalink
Clean up + force blur of button on click
Browse files Browse the repository at this point in the history
  • Loading branch information
Heenawter committed Jun 13, 2023
1 parent 626fb87 commit c29530a
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* Side Public License, v 1.
*/

import React from 'react';
import React, { SyntheticEvent } from 'react';

import { EuiButtonIcon, EuiToolTip } from '@elastic/eui';
import { isErrorEmbeddable } from '@kbn/embeddable-plugin/public';
Expand Down Expand Up @@ -35,7 +35,10 @@ export class ClearControlAction implements Action<ClearControlActionContext> {
data-test-subj={`control-action-${context.embeddable.id}-erase`}
aria-label={this.getDisplayName(context)}
iconType={this.getIconType(context)}
onClick={() => this.execute(context)}
onClick={(event: SyntheticEvent<HTMLButtonElement>) => {
(event.target as HTMLButtonElement).blur();
this.execute(context);
}}
color="text"
/>
</EuiToolTip>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,7 @@
import React, { FC, ComponentProps, Ref, useEffect, useState } from 'react';
import useMount from 'react-use/lib/useMount';

import {
EuiPopoverTitle,
EuiFlexGroup,
EuiFlexItem,
EuiDualRange,
EuiText,
EuiToolTip,
EuiButtonIcon,
} from '@elastic/eui';
import { EuiPopoverTitle, EuiDualRange, EuiText } from '@elastic/eui';
import type { EuiDualRangeClass } from '@elastic/eui/src/components/form/range/dual_range';

import { pluginServices } from '../../services';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
}

.euiText {
background-color: $euiFormBackgroundColor !important;;
background-color: $euiFormBackgroundColor !important;
}

.timeSlider__anchorText {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import _ from 'lodash';
import { debounceTime, first, map } from 'rxjs/operators';
import moment from 'moment-timezone';
import { Embeddable, IContainer } from '@kbn/embeddable-plugin/public';
import { IContainer } from '@kbn/embeddable-plugin/public';
import { ReduxEmbeddableTools, ReduxToolsPackage } from '@kbn/presentation-util-plugin/public';
import type { TimeRange } from '@kbn/es-query';
import { KibanaThemeProvider } from '@kbn/kibana-react-plugin/public';
Expand Down
3 changes: 0 additions & 3 deletions x-pack/plugins/translations/translations/fr-FR.json
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,6 @@
"controls.optionsList.editor.runPastTimeout.tooltip": "Attendre que la liste soit complète pour afficher les résultats. Ce paramètre est utile pour les ensembles de données volumineux, mais le remplissage des résultats peut prendre plus de temps.",
"controls.optionsList.popover.allOptionsTitle": "Afficher toutes les options",
"controls.optionsList.popover.allowExpensiveQueriesWarning": "Le paramètre de cluster permettant d'autoriser les requêtes lourdes est désactivé, impliquant la désactivation d'autres fonctionnalités.",
"controls.optionsList.popover.clearAllSelectionsTitle": "Effacer les sélections",
"controls.optionsList.popover.empty": "Aucune option trouvée",
"controls.optionsList.popover.endOfOptions": "Les 1 000 premières options disponibles sont affichées. Affichez davantage d'options en recherchant le nom.",
"controls.optionsList.popover.excludeLabel": "Exclure",
Expand All @@ -494,15 +493,13 @@
"controls.optionsList.popover.sortTitle": "Trier",
"controls.rangeSlider.description": "Ajoutez un contrôle pour la sélection d'une plage de valeurs de champ.",
"controls.rangeSlider.displayName": "Curseur de plage",
"controls.rangeSlider.popover.clearRangeTitle": "Effacer la plage",
"controls.rangeSlider.popover.noAvailableDataHelpText": "Il n'y a aucune donnée à afficher. Ajustez la plage temporelle et les filtres.",
"controls.rangeSlider.popover.noDataHelpText": "La plage sélectionnée n'a généré aucune donnée. Aucun filtre n'a été appliqué.",
"controls.timeSlider.description": "Ajouter un curseur pour la sélection d'une plage temporelle",
"controls.timeSlider.displayName": "Curseur temporel",
"controls.timeSlider.nextLabel": "Fenêtre temporelle suivante",
"controls.timeSlider.pauseLabel": "Pause",
"controls.timeSlider.playLabel": "Lecture",
"controls.timeSlider.popover.clearTimeTitle": "Effacer la sélection de temps",
"controls.timeSlider.previousLabel": "Fenêtre temporelle précédente",
"controls.timeSlider.settings.pinStart": "Épingler le début",
"controls.timeSlider.settings.unpinStart": "Désépingler le début",
Expand Down
3 changes: 0 additions & 3 deletions x-pack/plugins/translations/translations/ja-JP.json
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,6 @@
"controls.optionsList.editor.runPastTimeout.tooltip": "リストが入力されるまで待機してから、結果を表示します。この設定は大きいデータセットで有用です。ただし、結果の入力に時間がかかる場合があります。",
"controls.optionsList.popover.allOptionsTitle": "すべてのオプションを表示",
"controls.optionsList.popover.allowExpensiveQueriesWarning": "コストがかかるクエリを許可するクラスター設定がオフであるため、一部の機能が無効です。",
"controls.optionsList.popover.clearAllSelectionsTitle": "選択した項目をクリア",
"controls.optionsList.popover.empty": "オプションが見つかりません",
"controls.optionsList.popover.endOfOptions": "上位1,000個の使用可能なオプションが表示されます。その他のオプションを表示するには、名前を検索します。",
"controls.optionsList.popover.excludeLabel": "除外",
Expand All @@ -494,15 +493,13 @@
"controls.optionsList.popover.sortTitle": "並べ替え",
"controls.rangeSlider.description": "フィールド値の範囲を選択するためのコントロールを追加",
"controls.rangeSlider.displayName": "範囲スライダー",
"controls.rangeSlider.popover.clearRangeTitle": "範囲を消去",
"controls.rangeSlider.popover.noAvailableDataHelpText": "表示するデータがありません。時間範囲とフィルターを調整します。",
"controls.rangeSlider.popover.noDataHelpText": "選択された範囲にはデータがありません。フィルターが適用されませんでした。",
"controls.timeSlider.description": "時間範囲を選択するためのスライダーを追加",
"controls.timeSlider.displayName": "時間スライダー",
"controls.timeSlider.nextLabel": "次の時間ウィンドウ",
"controls.timeSlider.pauseLabel": "一時停止",
"controls.timeSlider.playLabel": "再生",
"controls.timeSlider.popover.clearTimeTitle": "時間選択のクリア",
"controls.timeSlider.previousLabel": "前の時間ウィンドウ",
"controls.timeSlider.settings.pinStart": "開始をピン留め",
"controls.timeSlider.settings.unpinStart": "開始をピン留め解除",
Expand Down
3 changes: 0 additions & 3 deletions x-pack/plugins/translations/translations/zh-CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,6 @@
"controls.optionsList.editor.runPastTimeout.tooltip": "等待显示结果,直到列表完成。此设置用于大型数据集,但可能需要更长时间来填充结果。",
"controls.optionsList.popover.allOptionsTitle": "显示所有选项",
"controls.optionsList.popover.allowExpensiveQueriesWarning": "允许资源密集型查询的集群设置已关闭,因此会禁用某些功能。",
"controls.optionsList.popover.clearAllSelectionsTitle": "清除所选内容",
"controls.optionsList.popover.empty": "找不到选项",
"controls.optionsList.popover.endOfOptions": "显示了前 1,000 个可用选项。通过搜索名称查看更多选项。",
"controls.optionsList.popover.excludeLabel": "排除",
Expand All @@ -494,15 +493,13 @@
"controls.optionsList.popover.sortTitle": "排序",
"controls.rangeSlider.description": "添加用于选择字段值范围的控件。",
"controls.rangeSlider.displayName": "范围滑块",
"controls.rangeSlider.popover.clearRangeTitle": "清除范围",
"controls.rangeSlider.popover.noAvailableDataHelpText": "没有可显示的数据。调整时间范围和筛选。",
"controls.rangeSlider.popover.noDataHelpText": "选定范围未生成任何数据。未应用任何筛选。",
"controls.timeSlider.description": "添加用于选择时间范围的滑块",
"controls.timeSlider.displayName": "时间滑块",
"controls.timeSlider.nextLabel": "下一时间窗口",
"controls.timeSlider.pauseLabel": "暂停",
"controls.timeSlider.playLabel": "播放",
"controls.timeSlider.popover.clearTimeTitle": "清除时间选择",
"controls.timeSlider.previousLabel": "上一时间窗口",
"controls.timeSlider.settings.pinStart": "固定开始屏幕",
"controls.timeSlider.settings.unpinStart": "取消固定开始屏幕",
Expand Down

0 comments on commit c29530a

Please sign in to comment.