diff --git a/src/components/NameServerGroupAdd.tsx b/src/components/NameServerGroupAdd.tsx index e826066..360c951 100644 --- a/src/components/NameServerGroupAdd.tsx +++ b/src/components/NameServerGroupAdd.tsx @@ -126,6 +126,7 @@ const NameServerGroupAdd = () => { }; const onChange = (changedValues: any) => { + if (changedValues.primary !== undefined) { setIsPrimary(changedValues.primary); } @@ -207,6 +208,7 @@ const NameServerGroupAdd = () => { let nsGroupLocal = {} as NameServerGroup; if (value === customChoice) { nsGroupLocal = nsGroup; + nsGroupLocal.domains = []; } else { defaultDNSOptions.forEach((nsg) => { if (value === nsg.name) { diff --git a/src/utils/routes.ts b/src/utils/routes.ts index aa59878..24ee2a7 100644 --- a/src/utils/routes.ts +++ b/src/utils/routes.ts @@ -96,7 +96,7 @@ export const transformGroupedDataTable = ( } }); groupList = groupList.filter( - (value, index, arrary) => arrary.indexOf(value) === index + (value, index, array) => array.indexOf(value) === index ); let groupDataTableRoutes = transformDataTable(listedRoutes, peers); const filterEnabledRoutes = groupDataTableRoutes.filter(