Show all 8760 rows in file preview (no limit)
This commit is contained in:
parent
b00d0fa76f
commit
fd0aa5060a
1 changed files with 10 additions and 15 deletions
|
|
@ -401,7 +401,7 @@ export function ProfileViewer() {
|
||||||
{/* File preview section */}
|
{/* File preview section */}
|
||||||
{selectedFile && (
|
{selectedFile && (
|
||||||
<div className="mb-6 border rounded-lg overflow-hidden">
|
<div className="mb-6 border rounded-lg overflow-hidden">
|
||||||
<div className="flex items-center justify-between p-3 bg-muted/50 border-b">
|
<div className="flex items-center justify-between p-3 bg-muted/50 border-b sticky top-0 z-10">
|
||||||
<div className="flex items-center gap-2">
|
<div className="flex items-center gap-2">
|
||||||
<span className="text-sm font-medium">{selectedFile.name}</span>
|
<span className="text-sm font-medium">{selectedFile.name}</span>
|
||||||
<span className="text-xs text-muted-foreground">({selectedFile.data.length} rows)</span>
|
<span className="text-xs text-muted-foreground">({selectedFile.data.length} rows)</span>
|
||||||
|
|
@ -422,9 +422,9 @@ export function ProfileViewer() {
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="max-h-80 overflow-auto">
|
<div className="max-h-[500px] overflow-auto">
|
||||||
<table className="w-full text-xs">
|
<table className="w-full text-xs">
|
||||||
<thead className="bg-muted/30 sticky top-0">
|
<thead className="bg-muted/50 sticky top-0">
|
||||||
<tr>
|
<tr>
|
||||||
<th className="px-3 py-2 text-left font-medium text-muted-foreground">Hour</th>
|
<th className="px-3 py-2 text-left font-medium text-muted-foreground">Hour</th>
|
||||||
<th className="px-3 py-2 text-left font-medium text-muted-foreground">Date</th>
|
<th className="px-3 py-2 text-left font-medium text-muted-foreground">Date</th>
|
||||||
|
|
@ -435,23 +435,18 @@ export function ProfileViewer() {
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
{selectedFile.data.slice(0, 100).map((row: string[], i: number) => (
|
{selectedFile.data.map((row: string[], i: number) => (
|
||||||
<tr key={i} className="border-t border-border/50 hover:bg-accent/30">
|
<tr key={i} className="border-t border-border/50 hover:bg-accent/30">
|
||||||
<td className="px-3 py-1.5">{row[0]}</td>
|
<td className="px-3 py-1">{row[0]}</td>
|
||||||
<td className="px-3 py-1.5">{row[1]}</td>
|
<td className="px-3 py-1">{row[1]}</td>
|
||||||
<td className="px-3 py-1.5">{row[2]}</td>
|
<td className="px-3 py-1">{row[2]}</td>
|
||||||
<td className="px-3 py-1.5">{row[3]}</td>
|
<td className="px-3 py-1">{row[3]}</td>
|
||||||
<td className="px-3 py-1.5">{row[4]}</td>
|
<td className="px-3 py-1">{row[4]}</td>
|
||||||
<td className="px-3 py-1.5 text-right tabular-nums">{row[5]}</td>
|
<td className="px-3 py-1 text-right tabular-nums">{row[5]}</td>
|
||||||
</tr>
|
</tr>
|
||||||
))}
|
))}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
{selectedFile.data.length > 100 && (
|
|
||||||
<div className="p-3 text-center text-xs text-muted-foreground bg-muted/30 border-t">
|
|
||||||
Showing first 100 of {selectedFile.data.length} rows. Download CSV for full data.
|
|
||||||
</div>
|
|
||||||
)}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue