diff --git a/packages/my-joy-beta/src/containers/create-instance/metadata.js b/packages/my-joy-beta/src/containers/create-instance/metadata.js index 1fd3b58a..e81a7c18 100644 --- a/packages/my-joy-beta/src/containers/create-instance/metadata.js +++ b/packages/my-joy-beta/src/containers/create-instance/metadata.js @@ -57,7 +57,7 @@ export const Metadata = ({ ) : null} - {metadata.map(({ name, value, expanded }, index) => ( + {metadata.map(({ name, value, open }, index) => ( handleToggleExpanded(index)} + onToggleExpanded={() => + expanded ? handleToggleExpanded(index) : null} onCancel={() => handleCancelEdit(index)} onRemove={() => handleRemoveMetadata(index)} /> @@ -137,7 +138,7 @@ export default compose( set({ name: 'create-instance-metadata-proceeded', value: true }) ); - return history.push(`/instances/~create/user-scripts`); + return history.push(`/instances/~create/user-script`); }, handleEdit: () => { return history.push(`/instances/~create/metadata`); @@ -150,7 +151,7 @@ export default compose( const appendMetadata = set({ name: `create-instance-metadata`, - value: metadata.concat([{ ...value, expanded: false }]) + value: metadata.concat([{ ...value, open: false }]) }); return dispatch([ @@ -162,7 +163,7 @@ export default compose( handleUpdateMetadata: (index, newMetadata) => { metadata[index] = { ...newMetadata, - expanded: false + open: false }; return dispatch([ @@ -179,7 +180,7 @@ export default compose( handleToggleExpanded: index => { metadata[index] = { ...metadata[index], - expanded: !metadata[index].expanded + open: !metadata[index].open }; return dispatch( @@ -192,7 +193,7 @@ export default compose( handleCancelEdit: index => { metadata[index] = { ...metadata[index], - expanded: false + open: false }; return dispatch([