succinctlabs / succinctx

The schelling point for ZK applications.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Upgrade filters

dino19981 opened this issue · comments

In all filters, the search starts with the first character of the search element, but the search element can consist of multiple words, for example on the screen "https://alpha.succinct.xyz/explorer", and it would be desirable to have the ability to enter only the id for search in this case. It is also desired that the search does not consider the case of words, which would simplify entering characters.

Here is the code if it were written in JavaScript.

function filterStrings(strings, searchStr) {
  return strings.filter((str) => {
    return str.toLowerCase().includes(searchStr.toLowerCase());
  });
}