The tag editor will populate the IDs when the tags belong to a predefined
vocabulary.
Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima <ldipentima@veritasgenetics.com>
export interface TagProperty {
key: string;
+ keyID?: string;
value: string;
+ valueID?: string;
}
export enum TagTailType {
uuid, {
properties: {
...JSON.parse(JSON.stringify(item.properties)),
- [data.key]: data.value
+ [data.keyID || data.key]: data.valueID || data.value
}
}
);
- item.properties[data.key] = data.value;
+ 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;
export const CollectionTagForm = reduxForm<ResourcePropertiesFormData>({
form: COLLECTION_TAG_FORM_NAME,
onSubmit: (data, dispatch) => {
- console.log('FORM SUBMIT: ', data);
dispatch<any>(createCollectionTag(data));
dispatch(reset(COLLECTION_TAG_FORM_NAME));
}