mirror of
https://github.com/bitwarden/browser.git
synced 2024-12-22 16:29:09 +01:00
Debounce value changes (#5244)
This value change was triggering multiple times on a single change. Others in file are not.
This commit is contained in:
parent
c47194b21c
commit
4fbc8864fe
@ -1,7 +1,7 @@
|
|||||||
import { Component, ElementRef, OnInit, ViewChild } from "@angular/core";
|
import { Component, ElementRef, OnInit, ViewChild } from "@angular/core";
|
||||||
import { FormBuilder } from "@angular/forms";
|
import { FormBuilder } from "@angular/forms";
|
||||||
import { Router } from "@angular/router";
|
import { Router } from "@angular/router";
|
||||||
import { concatMap, filter, map, Observable, Subject, takeUntil, tap } from "rxjs";
|
import { concatMap, debounceTime, filter, map, Observable, Subject, takeUntil, tap } from "rxjs";
|
||||||
import Swal from "sweetalert2";
|
import Swal from "sweetalert2";
|
||||||
|
|
||||||
import { ModalService } from "@bitwarden/angular/services/modal.service";
|
import { ModalService } from "@bitwarden/angular/services/modal.service";
|
||||||
@ -155,6 +155,7 @@ export class SettingsComponent implements OnInit {
|
|||||||
|
|
||||||
this.form.controls.vaultTimeout.valueChanges
|
this.form.controls.vaultTimeout.valueChanges
|
||||||
.pipe(
|
.pipe(
|
||||||
|
debounceTime(250),
|
||||||
concatMap(async (value) => {
|
concatMap(async (value) => {
|
||||||
await this.saveVaultTimeout(value);
|
await this.saveVaultTimeout(value);
|
||||||
}),
|
}),
|
||||||
|
Loading…
Reference in New Issue
Block a user