|
|
@ -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,9 +53,7 @@ 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)) |
|
|
|
|
|
|
|
.map((name) => ( |
|
|
|
|
|
|
|
<DropdownItem key={name} value={name} onClick={() => onScrapePoolChange(name)} active={name === selectedPool}> |
|
|
|
<DropdownItem key={name} value={name} onClick={() => onScrapePoolChange(name)} active={name === selectedPool}> |
|
|
|
{name} |
|
|
|
{name} |
|
|
|
</DropdownItem> |
|
|
|
</DropdownItem> |
|
|
|