From 80a338c7b417074d256c9e8a17ed921185e70182 Mon Sep 17 00:00:00 2001 From: padamsen_fisker Date: Tue, 21 May 2024 13:58:10 -0400 Subject: [PATCH] CEC-6051 - Select All for fleet bulk actions --- .../Controls/DropDownButton/index.jsx | 6 ++--- .../Fleets/Status/Vehicles/Table/index.jsx | 24 ++++++------------- src/components/Table/HeaderSortable/index.jsx | 9 ++++--- 3 files changed, 16 insertions(+), 23 deletions(-) diff --git a/src/components/Controls/DropDownButton/index.jsx b/src/components/Controls/DropDownButton/index.jsx index e5c572d..49ef692 100644 --- a/src/components/Controls/DropDownButton/index.jsx +++ b/src/components/Controls/DropDownButton/index.jsx @@ -18,7 +18,7 @@ const DropDownButton = ({ actions = [], payload = [], onClick = () => { } }) => const handleClick = () => { onClick() - actions[selectedIndex].trigger(...payload); + actions[selectedIndex] ? actions[selectedIndex].trigger(...payload) : actions[0].trigger(...payload) }; const handleMenuItemClick = (event, index) => { @@ -55,9 +55,9 @@ const DropDownButton = ({ actions = [], payload = [], onClick = () => { } }) => >