Skip to content

Commit

Permalink
fix: group by id before hidden
Browse files Browse the repository at this point in the history
  • Loading branch information
atanasster committed Aug 4, 2020
1 parent 6f47f35 commit 90bd055
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ui/components/src/ActionBar/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ export type ActionItems = ActionItem[];
*/
export const getSortedActions = (actions: ActionItems): ActionItems =>
actions
.filter(({ hidden }) => !hidden)
.reduce((acc: ActionItem[], item: ActionItem) => {
const accIndex = acc.findIndex(
accItem => (accItem.id ?? accItem.node) === (item.id ?? item.node),
Expand All @@ -68,6 +67,7 @@ export const getSortedActions = (actions: ActionItems): ActionItems =>
return [...acc, item];
}
}, [])
.filter(({ hidden }) => !hidden)
.map(
({ order, ...item }, index) =>
({
Expand Down

0 comments on commit 90bd055

Please sign in to comment.