diff --git a/packages/my-joy-beta/src/components/create-instance/network.js b/packages/my-joy-beta/src/components/create-instance/network.js index 767be4bd..446c0ebd 100644 --- a/packages/my-joy-beta/src/components/create-instance/network.js +++ b/packages/my-joy-beta/src/components/create-instance/network.js @@ -115,7 +115,7 @@ export const Expanded = ({ - + diff --git a/packages/my-joy-beta/src/containers/create-instance/__tests__/__snapshots__/networks.spec.js.snap b/packages/my-joy-beta/src/containers/create-instance/__tests__/__snapshots__/networks.spec.js.snap index 1c5d8db3..f072137a 100644 --- a/packages/my-joy-beta/src/containers/create-instance/__tests__/__snapshots__/networks.spec.js.snap +++ b/packages/my-joy-beta/src/containers/create-instance/__tests__/__snapshots__/networks.spec.js.snap @@ -2663,7 +2663,7 @@ Array [ className="c7" >
{ const selected = get(form, `${FORM_NAME}.values`, {}); + const empty = id => !Object.keys(selected).includes(id); return { proceeded: get(values, 'create-instance-networks-proceeded', false), - networks: networks.map(({ id, ...network }) => ({ - ...network, - selected: Boolean(selected[id]), - infoExpanded: get( - values, - `create-instance-networks-${id}-expanded`, - false - ), - id - })) + networks: networks + .map(({ id, name, ...network }) => ({ + ...network, + name, + selected: + empty(id) && name === 'Joyent-SDC-Public' + ? true + : Boolean(selected[id]), + infoExpanded: get( + values, + `create-instance-networks-${id}-expanded`, + false + ), + id + })) + .sort((a, b) => a.name < b.name) }; }, (dispatch, { history }) => ({