Skip to content

Commit 1f7c35f

Browse files
committed
5.7.5-rev
1 parent 4b765d0 commit 1f7c35f

File tree

5 files changed

+29
-4
lines changed

5 files changed

+29
-4
lines changed

public/app.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/app.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/mix-manifest.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
2-
"/app.js": "/app.js?id=8b0adba6dc2243667e83739a6fa92538",
2+
"/app.js": "/app.js?id=eaafcecbc6b35b40bfd851e7cf159d8b",
33
"/ui.js": "/ui.js?id=b8df0ca1161b86cfb1aca2b3b642e584",
44
"/manifest.js": "/manifest.js?id=3267e5c99fd7b729e2f38ec55b50397d",
5-
"/app.css": "/app.css?id=4ac240e9b4c482451bf95d4161751414",
5+
"/app.css": "/app.css?id=6bf1ed6c465b3593de019b3e9a3a58e5",
66
"/vendor.js": "/vendor.js?id=6ae7fe3f69a61c1b9893625b83d40c36",
77
"/fonts/snunitosansv11pe01mimslybiv1o4x1m8cce4g1pty10iurt9w6fk2a.woff2": "/fonts/snunitosansv11pe01mimslybiv1o4x1m8cce4g1pty10iurt9w6fk2a.woff2?id=c8390e146be0a3c8a5498355dec892ae",
88
"/fonts/snunitosansv11pe01mimslybiv1o4x1m8cce4g1pty14iurt9w6fk2a.woff2": "/fonts/snunitosansv11pe01mimslybiv1o4x1m8cce4g1pty14iurt9w6fk2a.woff2?id=b0735c7dd6126471acbaf9d6e9f5e41a",

resources/js/components/Metrics/TableMetric.vue

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
<div
1010
v-if="value.length > 0"
1111
class="overflow-hidden overflow-x-auto relative"
12+
:class="card.scrollable ? 'h-[320px] overflow-y-auto' : ''"
1213
>
1314
<table class="w-full table-default table-fixed">
1415
<tbody
@@ -18,6 +19,7 @@
1819
</tbody>
1920
</table>
2021
</div>
22+
2123
<div v-else class="flex flex-col items-center justify-between px-6 gap-2">
2224
<p class="font-normal text-center py-4">
2325
{{ card.emptyText }}
@@ -95,3 +97,11 @@ export default {
9597
},
9698
}
9799
</script>
100+
101+
<style scoped>
102+
/* Scrollbar tipis (aktif hanya jika overflow-y-auto ada, yaitu saat scrollable = true) */
103+
::-webkit-scrollbar { width: 6px; }
104+
::-webkit-scrollbar-thumb { background-color: rgba(100,116,139,.5); border-radius: 9999px; }
105+
::-webkit-scrollbar-thumb:hover { background-color: rgba(100,116,139,.8); }
106+
::-webkit-scrollbar-track { background: transparent; }
107+
</style>

src/Metrics/Table.php

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ class Table extends Metric
2121
*/
2222
public $emptyText = 'No Results Found...';
2323

24+
public $scrollable = false;
25+
2426
/**
2527
* Set the text to be displayed when the table is empty.
2628
*
@@ -33,6 +35,18 @@ public function emptyText(Stringable|string $text)
3335
return $this;
3436
}
3537

38+
/**
39+
* Set the table's scrollable behavior.
40+
*
41+
* @param bool $scrollable
42+
* @return $this
43+
*/
44+
public function scrollable(bool $scrollable = true)
45+
{
46+
$this->scrollable = $scrollable;
47+
48+
return $this;
49+
}
3650
/**
3751
* Prepare the metric for JSON serialization.
3852
*
@@ -43,6 +57,7 @@ public function jsonSerialize(): array
4357
{
4458
return array_merge(parent::jsonSerialize(), [
4559
'emptyText' => Nova::__($this->emptyText),
60+
'scrollable' => Nova::__($this->scrollable),
4661
]);
4762
}
4863
}

0 commit comments

Comments
 (0)