Ensure the correct dialog is shown for SAML keys (#4215)
This commit is contained in:
parent
3eeb684e44
commit
158f471bea
1 changed files with 4 additions and 4 deletions
|
@ -158,7 +158,7 @@ export const SamlKeys = ({ clientId, save }: SamlKeysProps) => {
|
||||||
const [isChanged, setIsChanged] = useState<KeyTypes>();
|
const [isChanged, setIsChanged] = useState<KeyTypes>();
|
||||||
const [keyInfo, setKeyInfo] = useState<CertificateRepresentation[]>();
|
const [keyInfo, setKeyInfo] = useState<CertificateRepresentation[]>();
|
||||||
const [selectedType, setSelectedType] = useState<KeyTypes>();
|
const [selectedType, setSelectedType] = useState<KeyTypes>();
|
||||||
const [openImport, setImportOpen] = useState(false);
|
const [openImport, setImportOpen] = useState<KeyTypes>();
|
||||||
const [refresh, setRefresh] = useState(0);
|
const [refresh, setRefresh] = useState(0);
|
||||||
|
|
||||||
const { setValue } = useFormContext();
|
const { setValue } = useFormContext();
|
||||||
|
@ -247,11 +247,11 @@ export const SamlKeys = ({ clientId, save }: SamlKeysProps) => {
|
||||||
<ReGenerateConfirm />
|
<ReGenerateConfirm />
|
||||||
{KEYS.map((attr, index) => (
|
{KEYS.map((attr, index) => (
|
||||||
<Fragment key={attr}>
|
<Fragment key={attr}>
|
||||||
{openImport && (
|
{openImport === attr && (
|
||||||
<SamlImportKeyDialog
|
<SamlImportKeyDialog
|
||||||
id={clientId}
|
id={clientId}
|
||||||
attr={attr}
|
attr={attr}
|
||||||
onClose={() => setImportOpen(false)}
|
onClose={() => setImportOpen(undefined)}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
<KeySection
|
<KeySection
|
||||||
|
@ -267,7 +267,7 @@ export const SamlKeys = ({ clientId, save }: SamlKeysProps) => {
|
||||||
toggleReGenerateDialog();
|
toggleReGenerateDialog();
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
onImport={() => setImportOpen(true)}
|
onImport={() => setImportOpen(attr)}
|
||||||
/>
|
/>
|
||||||
</Fragment>
|
</Fragment>
|
||||||
))}
|
))}
|
||||||
|
|
Loading…
Reference in a new issue