|
|
@ -31,6 +31,8 @@ const ScrapePoolDropDown: FC<ScrapePoolDropDownProps> = ({ selectedPool, scrapeP
|
|
|
|
|
|
|
|
|
|
|
|
const [filter, setFilter] = useState<string>('');
|
|
|
|
const [filter, setFilter] = useState<string>('');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const filteredPools = scrapePools.filter((pool) => pool.toLowerCase().includes(filter.toLowerCase()));
|
|
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
return (
|
|
|
|
<Dropdown isOpen={dropdownOpen} toggle={toggle}>
|
|
|
|
<Dropdown isOpen={dropdownOpen} toggle={toggle}>
|
|
|
|
<DropdownToggle caret className="mw-100 text-truncate">
|
|
|
|
<DropdownToggle caret className="mw-100 text-truncate">
|
|
|
@ -51,13 +53,11 @@ const ScrapePoolDropDown: FC<ScrapePoolDropDownProps> = ({ selectedPool, scrapeP
|
|
|
|
{scrapePools.length === 0 ? (
|
|
|
|
{scrapePools.length === 0 ? (
|
|
|
|
<DropdownItem disabled>No scrape pools configured</DropdownItem>
|
|
|
|
<DropdownItem disabled>No scrape pools configured</DropdownItem>
|
|
|
|
) : (
|
|
|
|
) : (
|
|
|
|
scrapePools
|
|
|
|
filteredPools.map((name) => (
|
|
|
|
.filter((name) => filter === '' || name.includes(filter))
|
|
|
|
<DropdownItem key={name} value={name} onClick={() => onScrapePoolChange(name)} active={name === selectedPool}>
|
|
|
|
.map((name) => (
|
|
|
|
{name}
|
|
|
|
<DropdownItem key={name} value={name} onClick={() => onScrapePoolChange(name)} active={name === selectedPool}>
|
|
|
|
</DropdownItem>
|
|
|
|
{name}
|
|
|
|
))
|
|
|
|
</DropdownItem>
|
|
|
|
|
|
|
|
))
|
|
|
|
|
|
|
|
)}
|
|
|
|
)}
|
|
|
|
</DropdownMenu>
|
|
|
|
</DropdownMenu>
|
|
|
|
</Dropdown>
|
|
|
|
</Dropdown>
|
|
|
|