- if (item) {
- const key = data.keyID || data.key;
- const value = data.valueID || data.value;
- item.properties = addProperty(item.properties, key, value);
- const updatedCollection = await services.collectionService.update(
- uuid, {
- properties: {...item.properties}
- }
- );
- item.properties = updatedCollection.properties;
- dispatch(resourcesActions.SET_RESOURCES([updatedCollection]));
- dispatch(snackbarActions.OPEN_SNACKBAR({ message: "Tag has been successfully added.", hideDuration: 2000, kind: SnackbarKind.SUCCESS }));
- return updatedCollection;
- }
- return;
+ const key = data.keyID || data.key;
+ const value = data.valueID || data.value;
+ const updatedCollection = await services.collectionService.update(
+ item.uuid, {
+ properties: addProperty(properties, key, value)
+ }
+ );
+ dispatch(collectionPanelActions.SET_COLLECTION(updatedCollection));
+ dispatch(resourcesActions.SET_RESOURCES([updatedCollection]));
+ dispatch(snackbarActions.OPEN_SNACKBAR({ message: "Tag has been successfully added.", hideDuration: 2000, kind: SnackbarKind.SUCCESS }));
+ return updatedCollection;