diff --git a/src/client-scopes/add/MapperDialog.tsx b/src/client-scopes/add/MapperDialog.tsx index 0bb16671db..c7f77f637a 100644 --- a/src/client-scopes/add/MapperDialog.tsx +++ b/src/client-scopes/add/MapperDialog.tsx @@ -92,11 +92,11 @@ export const AddMapperDialog = (props: AddMapperDialogProps) => { return ( - {t("chooseAMapperType")} + {t("addPredefinedMappers")} {t("predefinedMappingDescription")} } @@ -138,7 +138,7 @@ export const AddMapperDialog = (props: AddMapperDialogProps) => { props.onConfirm(mapper!); props.toggleDialog(); }} - aria-label={t("chooseAMapperType")} + aria-label={t("addPredefinedMappers")} isCompact > @@ -179,12 +179,21 @@ export const AddMapperDialog = (props: AddMapperDialogProps) => { variant={TableVariant.compact} cells={header} onSelect={(_, isSelected, rowIndex) => { - rows[rowIndex].selected = isSelected; - setRows([...rows]); + if (rowIndex === -1) { + setRows( + rows.map((row) => ({ + ...row, + selected: isSelected, + })) + ); + } else { + rows[rowIndex].selected = isSelected; + setRows([...rows]); + } }} - canSelectAll={false} + canSelectAll rows={rows} - aria-label={t("chooseAMapperType")} + aria-label={t("addPredefinedMappers")} > diff --git a/src/client-scopes/messages.ts b/src/client-scopes/messages.ts index ae299f6fe0..0a426e7c28 100644 --- a/src/client-scopes/messages.ts +++ b/src/client-scopes/messages.ts @@ -45,8 +45,9 @@ export default { guiOrder: "Display Order", shouldBeANumber: "Should be a number", chooseAMapperType: "Choose a mapper type", + addPredefinedMappers: "Add predefined mappers", predefinedMappingDescription: - "Choose one of the predefined mappings from this table", + "Choose any of the predefined mappings from this table", mappingTable: "Table with predefined mapping", scope: "Scope", roleMappingUpdatedSuccess: "Role mapping updated",