diff --git a/module/actor-sheet.js b/module/actor-sheet.js index 09f497c9..d8bd89d6 100644 --- a/module/actor-sheet.js +++ b/module/actor-sheet.js @@ -432,14 +432,17 @@ export class RdDActorSheet extends ActorSheet { } }) .keyup(async event => { - this.options.recherche = this._optionRecherche(event.currentTarget) - if (this.timerRecherche) { - clearTimeout(this.timerRecherche); + const nouvelleRecherche = this._optionRecherche(event.currentTarget); + if (this.options.recherche?.text != nouvelleRecherche?.text){ + this.options.recherche = nouvelleRecherche; + if (this.timerRecherche) { + clearTimeout(this.timerRecherche); + } + this.timerRecherche = setTimeout(() => { + this.timerRecherche = undefined; + this.render(true); + }, 500); } - this.timerRecherche = setTimeout(() => { - this.timerRecherche = undefined; - this.render(true); - }, 500); }) .change(async event => this.options.recherche = this._optionRecherche(event.currentTarget)