[Discover] Improve document selection menu (#101019)
- Change position of "Copy documents to clipboard (JSON)" and "Clear selection"
This commit is contained in:
parent
8a62b29374
commit
40c2990148
|
@ -96,19 +96,6 @@ export function DiscoverGridDocumentToolbarBtn({
|
|||
/>
|
||||
</EuiContextMenuItem>
|
||||
),
|
||||
|
||||
<EuiContextMenuItem
|
||||
data-test-subj="dscGridClearSelectedDocuments"
|
||||
key="clearSelection"
|
||||
icon="cross"
|
||||
onClick={() => {
|
||||
setIsSelectionPopoverOpen(false);
|
||||
setSelectedDocs([]);
|
||||
setIsFilterActive(false);
|
||||
}}
|
||||
>
|
||||
<FormattedMessage id="discover.clearSelection" defaultMessage="Clear selection" />
|
||||
</EuiContextMenuItem>,
|
||||
<EuiCopy
|
||||
key="copyJsonWrapper"
|
||||
data-test-subj="dscGridCopySelectedDocumentsJSON"
|
||||
|
@ -125,6 +112,18 @@ export function DiscoverGridDocumentToolbarBtn({
|
|||
</EuiContextMenuItem>
|
||||
)}
|
||||
</EuiCopy>,
|
||||
<EuiContextMenuItem
|
||||
data-test-subj="dscGridClearSelectedDocuments"
|
||||
key="clearSelection"
|
||||
icon="cross"
|
||||
onClick={() => {
|
||||
setIsSelectionPopoverOpen(false);
|
||||
setSelectedDocs([]);
|
||||
setIsFilterActive(false);
|
||||
}}
|
||||
>
|
||||
<FormattedMessage id="discover.clearSelection" defaultMessage="Clear selection" />
|
||||
</EuiContextMenuItem>,
|
||||
];
|
||||
}, [
|
||||
isFilterActive,
|
||||
|
|
Loading…
Reference in a new issue