diff --git a/src/js/app.js b/src/js/app.js index b3b66cc..9202d39 100644 --- a/src/js/app.js +++ b/src/js/app.js @@ -57,8 +57,13 @@ if (search) { return } + // Allow matching when fragment. + // E.g., "fin" will match any of "finland", of "digifinland" + // + // TODO: Fix this so it works with multiple words. + // E.g., "test finland" filters differently than "finland test" if (!searchValue.endsWith('*')) { - searchValue = `${searchValue} ${searchValue}*` + searchValue = `${searchValue} *${searchValue}*` } try {