Skip to content

Commit

Permalink
feat: 🎸 add separator for different context menu groups (#80498) (#80806
Browse files Browse the repository at this point in the history
)
  • Loading branch information
streamich authored Oct 16, 2020
1 parent bb5968c commit 400403b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export const PanelEditWithDrilldownsAndContextActions: React.FC = () => {
const customActionGrouping: Action['grouping'] = [
{
id: 'actions',
getDisplayName: () => 'Custom actions',
getDisplayName: () => 'API actions',
getIconType: () => 'cloudStormy',
order: 20,
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -201,8 +201,10 @@ export async function buildContextMenuForActions({

for (const panel of Object.values(panels)) {
if (panel._level === 0) {
// TODO: Add separator line here once it is available in EUI.
// See https://github.com/elastic/eui/pull/4018
panels.mainMenu.items.push({
isSeparator: true,
key: panel.id + '__separator',
});
if (panel.items.length > 3) {
panels.mainMenu.items.push({
name: panel.title || panel.id,
Expand Down

0 comments on commit 400403b

Please sign in to comment.