Skip to content

Commit 0e6da35

Browse files
committed
fix: search values binded
1 parent db73a4f commit 0e6da35

File tree

2 files changed

+12
-6
lines changed

2 files changed

+12
-6
lines changed

infrastructure/control-panel/src/lib/fragments/TableCardHeader/TableCardHeader.svelte

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,17 @@
22
let {
33
title,
44
searchValue = $bindable(''),
5-
rightTitle
6-
}: { title: string; searchValue: string; rightTitle: string } = $props();
5+
rightTitle,
6+
placeholder
7+
}: { title: string; searchValue: string; rightTitle: string, placeholder: string } = $props();
78
</script>
89

910
<header class="mb-4 flex w-full items-center justify-between px-4">
1011
<div class="flex items-center gap-4">
1112
<p class="text-black-700 font-semibold whitespace-nowrap">{title}</p>
1213
<input
1314
type="text"
14-
placeholder="Search eVaults"
15+
placeholder={placeholder}
1516
bind:value={searchValue}
1617
class="bg-black-100 text-black-700 placeholder:text-black-700 w-full rounded-[8px] border border-gray-300 px-4 py-1.5 text-xs outline-0"
1718
/>

infrastructure/control-panel/src/routes/+page.svelte

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
import { TableCard, TableCardHeader } from '$lib/fragments';
33
import { Table } from '$lib/ui';
44
5+
let eventsSearchValue = $state('');
6+
let platformsSearchQuery = $state('');
7+
58
const handlePreviousPage = async () => {
69
alert('Previous btn clicked. Make a call to your server to fetch data.');
710
};
@@ -95,7 +98,8 @@
9598
<TableCard>
9699
<TableCardHeader
97100
title="Events"
98-
searchValue=""
101+
placeholder="Search Events"
102+
bind:searchValue={eventsSearchValue}
99103
rightTitle="No evault selected. Select an evault to monitor logs"
100104
/>
101105
<Table
@@ -109,8 +113,9 @@
109113

110114
<TableCard>
111115
<TableCardHeader
112-
title="Events"
113-
searchValue=""
116+
title="Platforms"
117+
placeholder="Search Platforms"
118+
bind:searchValue={platformsSearchQuery}
114119
rightTitle="No evault selected. Select an evault to monitor logs"
115120
/>
116121
<Table

0 commit comments

Comments
 (0)