Skip to content

Commit

Permalink
[Discover] Improve document selection menu
Browse files Browse the repository at this point in the history
- Change position of "Copy documents to clipboard (JSON)" and "Clear selection"
  • Loading branch information
kertal committed May 31, 2021
1 parent 6c879cc commit af4b8e6
Showing 1 changed file with 12 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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,
Expand Down

0 comments on commit af4b8e6

Please sign in to comment.