Fixed searching in all chains (case insensitive + pretty name)

This commit is contained in:
zenodeapp 2023-12-03 20:40:50 +01:00
parent 4555bb9424
commit fe79a2ab11

View File

@ -14,8 +14,10 @@ const dashboard = useDashboard();
const keywords = ref('');
const chains = computed(() => {
if (keywords.value) {
const lowercaseKeywords = keywords.value.toLowerCase();
return Object.values(dashboard.chains).filter(
(x: ChainConfig) => x.chainName.indexOf(keywords.value) > -1
(x: ChainConfig) => x.prettyName.toLowerCase().indexOf(lowercaseKeywords) > -1
);
} else {
return Object.values(dashboard.chains);