web/admin: fix state issue after clearIcon/Background is used and for… (#5423)

web/admin: fix state issue after clearIcon/Background is used and form is re-used

Signed-off-by: Jens Langhammer <jens@goauthentik.io>
This commit is contained in:
Jens L
2023-04-30 14:25:18 +03:00
committed by GitHub
parent 0b0e08446d
commit cc8f52b502
5 changed files with 27 additions and 25 deletions

View File

@ -26,10 +26,12 @@ import {
@customElement("ak-flow-form")
export class FlowForm extends ModelForm<Flow, string> {
loadInstance(pk: string): Promise<Flow> {
return new FlowsApi(DEFAULT_CONFIG).flowsInstancesRetrieve({
async loadInstance(pk: string): Promise<Flow> {
const flow = await new FlowsApi(DEFAULT_CONFIG).flowsInstancesRetrieve({
slug: pk,
});
this.clearBackground = false;
return flow;
}
getSuccessMessage(): string {