From 71aa00038a4dfecaaef85bfa72cdcabdd35d80dd Mon Sep 17 00:00:00 2001
From: Furkan Sahin <furkan-dev@proton.me>
Date: Sun, 7 Aug 2022 12:32:46 -0500
Subject: Table head row is frozen/stickied to the top of the page now

---
 src/components/PeerTeachers.svelte | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

(limited to 'src/components/PeerTeachers.svelte')

diff --git a/src/components/PeerTeachers.svelte b/src/components/PeerTeachers.svelte
index 56da10f..986d696 100644
--- a/src/components/PeerTeachers.svelte
+++ b/src/components/PeerTeachers.svelte
@@ -54,14 +54,14 @@
   ];
 </script>
 
-<div class="overflow-auto h-full">
-  <table class="table table-compact w-full">
-    <!-- head -->
-    <thead>
+<div class="h-full overflow-auto">
+  <table class="table table-compact w-full h-full">
+    <thead class="bg-white border-b sticky top-0">
       <tr>
         {#each headers as header, i}
           <th>
             {#if i == 0}
+              <!-- display num PTs if first row -->
               {peerTeachers.length}
             {:else if header == "Email"}
               <div class="flex flex-row items-center">
@@ -80,6 +80,7 @@
         {/each}
       </tr>
     </thead>
+
     <tbody>
       {#each peerTeachers as pt, i}
         <tr
@@ -106,7 +107,7 @@
           <td>{pt.lastname}</td>
           <td>{pt.email}</td>
           <td>{pt.id}</td>
-          <td>{pt.phone_number}</td>
+          <td>{pt.phone}</td>
           <td>{pt.pref_work}</td>
           <td>{pt.lab_hours}</td>
           <td>{pt.gender}</td>
-- 
cgit v1.2.3

