@ -105,7 +105,9 @@ export class UsersState extends State<Snapshot> {
public load(isReload = false): Observable<any> {
if (!isReload) {
this.resetState();
const selectedUser = this.snapshot.selectedUser;
this.resetState({ selectedUser });
}
return this.loadInternal(isReload);
@ -170,8 +170,12 @@ export class State<T extends {}> {
this.state = new BehaviorSubject(state);
public resetState() {
public resetState(update?: ((v: T) => Readonly<T>) | object) {
this.state.next(this.initialState);
if (update) {
this.next(update);
public next(update: ((v: T) => Readonly<T>) | object) {
@ -118,7 +118,9 @@ export class SchemasState extends State<Snapshot> {
const selectedSchema = this.snapshot.selectedSchema;
this.resetState({ selectedSchema });
return this.schemasService.getSchemas(this.appName).pipe(