Skip to content

Commit 70e9f68

Browse files
committed
add search functionality for price feeds and smartdata testnet tables
1 parent 17be703 commit 70e9f68

File tree

1 file changed

+52
-9
lines changed

1 file changed

+52
-9
lines changed

src/features/feeds/components/FeedList.tsx

Lines changed: 52 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -589,15 +589,45 @@ export const FeedList = ({
589589
</>
590590
)}
591591
{!isStreams && (
592-
<label>
593-
<input
594-
type="checkbox"
595-
style="width:15px;height:15px;display:inline;"
596-
checked={showExtraDetails}
597-
onChange={() => setShowExtraDetails((old) => !old)}
598-
/>{" "}
599-
Show more details
600-
</label>
592+
<div className={feedList.tableFilters}>
593+
<div className={feedList.checkboxContainer}>
594+
<label className={feedList.detailsLabel}>
595+
<input
596+
type="checkbox"
597+
style="width:15px;height:15px;display:inline;"
598+
checked={showExtraDetails}
599+
onChange={() => setShowExtraDetails((old) => !old)}
600+
/>
601+
Show more details
602+
</label>
603+
</div>
604+
<form class={feedList.filterDropdown_search}>
605+
<input
606+
id="testnetSearch"
607+
class={feedList.filterDropdown_searchInput}
608+
placeholder="Search"
609+
onInput={(event) => {
610+
setTestnetSearchValue((event.target as HTMLInputElement).value)
611+
setTestnetCurrentPage("1")
612+
}}
613+
/>
614+
</form>
615+
</div>
616+
)}
617+
{isStreams && (
618+
<div className={feedList.tableFilters}>
619+
<form class={feedList.filterDropdown_search}>
620+
<input
621+
id="testnetSearch"
622+
class={feedList.filterDropdown_searchInput}
623+
placeholder="Search"
624+
onInput={(event) => {
625+
setTestnetSearchValue((event.target as HTMLInputElement).value)
626+
setTestnetCurrentPage("1")
627+
}}
628+
/>
629+
</form>
630+
</div>
601631
)}
602632
<TestnetTable
603633
network={network}
@@ -638,6 +668,19 @@ export const FeedList = ({
638668
}}
639669
/>
640670
</form>
671+
{!isStreams && (
672+
<div className={feedList.checkboxContainer}>
673+
<label className={feedList.detailsLabel}>
674+
<input
675+
type="checkbox"
676+
style="width:15px;height:15px;display:inline;"
677+
checked={showExtraDetails}
678+
onChange={() => setShowExtraDetails((old) => !old)}
679+
/>
680+
Show more details
681+
</label>
682+
</div>
683+
)}
641684
</div>
642685
<TestnetTable
643686
network={chainMetadata.processedData.testnetNetwork}

0 commit comments

Comments
 (0)