ajout de filtrage dans les cas similaires
This commit is contained in:
parent
a4645638cd
commit
a2afad0545
2 changed files with 7 additions and 1 deletions
|
@ -93,6 +93,8 @@
|
|||
class="search"
|
||||
placeholder="Use keywords for a precise research"
|
||||
[(ngModel)]="searchSimilarInput"
|
||||
(input)="filterResults()"
|
||||
(keyup.enter)="filterResults()"
|
||||
type="text">
|
||||
<button (click)="filterResults()" class="search-submit">
|
||||
<i class="ri-send-plane-fill"></i>
|
||||
|
|
|
@ -40,11 +40,15 @@ export class SimilarCases {
|
|||
this.appState = app;
|
||||
// Initialize filteredSimilarCases with all cases by default
|
||||
this.filteredSimilarCases = this.appState.similarCases || [];
|
||||
// Réappliquer le filtre si un terme est présent
|
||||
if (this.searchSimilarInput && this.searchSimilarInput.trim()) {
|
||||
this.filterResults();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
filterResults() {
|
||||
if (!this.appState.similarCases) {
|
||||
if (!this.appState || !Array.isArray(this.appState.similarCases)) {
|
||||
this.filteredSimilarCases = [];
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue