[InfraUI] Fix group by "x" icon keyboard controls (#31960)

* First pass at ensuring click events do not swallow keyUp event, also ensure menu doesn't open / close for no reason

* Add comment

* Add key

* Revert changes

* Remove icons on badges within context menu

* Remove unused translation with script
This commit is contained in:
Kerry Gallagher 2019-03-13 13:06:15 +00:00 committed by GitHub
parent fa5ac68b4e
commit c68a45f751
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 19 deletions

View file

@ -137,24 +137,7 @@ export const WaffleGroupByControls = injectI18n(
.filter(o => o != null)
// In this map the `o && o.field` is totally unnecessary but Typescript is
// too stupid to realize that the filter above prevents the next map from being null
.map(o => (
<EuiBadge
key={o && o.field}
iconType="cross"
iconOnClick={this.handleRemove((o && o.field) || '')}
iconOnClickAriaLabel={intl.formatMessage(
{
id: 'xpack.infra.waffle.removeGroupingItemAriaLabel',
defaultMessage: 'Remove {groupingItem} grouping',
},
{
groupingItem: o && o.text,
}
)}
>
{o && o.text}
</EuiBadge>
))
.map(o => <EuiBadge key={o && o.field}>{o && o.text}</EuiBadge>)
) : (
<FormattedMessage id="xpack.infra.waffle.groupByAllTitle" defaultMessage="All" />
);

View file

@ -4363,7 +4363,6 @@
"xpack.infra.waffle.noDataDescription": "尝试调整您的时间或筛选。",
"xpack.infra.waffle.noDataTitle": "没有可显示的数据。",
"xpack.infra.waffle.nodeTypeSwitcher.hostsLabel": "主机",
"xpack.infra.waffle.removeGroupingItemAriaLabel": "删除 {groupingItem} 分组",
"xpack.infra.waffle.selectTwoGroupingsTitle": "选择最多两个分组",
"xpack.infra.waffle.unableToSelectGroupErrorMessage": "无法选择 {nodeType} 的分组依据选项",
"xpack.infra.waffle.unableToSelectMetricErrorTitle": "无法选择指标选项或指标值。",