From f30e1c5b9e977d2c2b20890671853f9ea3aacabe Mon Sep 17 00:00:00 2001
From: Angapay Divin <divin.angapay@lam.fr>
Date: Tue, 12 Jul 2022 11:23:38 +0200
Subject: [PATCH] adjust the max shown items number to the result returned by
 the research

---
 .../search/components/result/datatable.component.html     | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/client/src/app/instance/search/components/result/datatable.component.html b/client/src/app/instance/search/components/result/datatable.component.html
index 69282def..1d0a511f 100644
--- a/client/src/app/instance/search/components/result/datatable.component.html
+++ b/client/src/app/instance/search/components/result/datatable.component.html
@@ -58,10 +58,10 @@
     <div class="col">
         Show 
         <select class="custom-select" (change)="changeNbItems($event.target.value)">
-            <option value="10" selected="true">10</option>
-            <option value="20">20</option>
-            <option value="50">50</option>
-            <option value="100">100</option>
+            <option *ngIf="dataLength <= 10 || dataLength >10" value="10" selected="true">10</option>
+            <option *ngIf="dataLength >10" value="20">20</option>
+            <option *ngIf="dataLength > 20" value="50">50</option>
+            <option *ngIf="dataLength > 50" value="100">100</option>
         </select>
         entries
     </div>
-- 
GitLab