Commit a696ddc4 authored by Viacheslav Pavlov's avatar Viacheslav Pavlov

Merge branch '295-dashboard-descriptors' into 'master'

Dashboard: Descriptors

Closes #295

See merge request genesys-pgr/genesys-ui!310
parents ee5c5ea6 b088c51f
......@@ -108,12 +108,11 @@ export const unpublishAll = (unPublishOne) => (dispatch, getState) => {
* Delete all items that are in dashboard.toEditList
* @param deleteOne: (uuid: string) => Promise<any> action to delete one item
*/
export const deleteAll = (deleteOne) => (dispatch, getState) => {
export const deleteAll = (deleteOne) => async (dispatch, getState) => {
const toDeleteItems = getState().dashboard.selected;
toDeleteItems.map((item) => {
deleteOne(item);
dispatch(removeFromList(item));
});
for (const item of toDeleteItems) {
await deleteOne(item);
dispatch(removeFromList(item));
}
dispatch(unselectAll());
};
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment