diff --git a/client/package.json b/client/package.json index e7d8b7964..861134a8d 100644 --- a/client/package.json +++ b/client/package.json @@ -73,7 +73,7 @@ "react-hook-form": "^4.9.4", "react-intl": "^3.12.0", "react-loadable": "^5.5.0", - "react-query": "^1.3.3", + "react-query": "^2.4.6", "react-redux": "^7.1.3", "react-router-breadcrumbs-hoc": "^3.2.10", "react-router-dom": "^5.1.2", @@ -128,7 +128,7 @@ "devDependencies": { "@babel/preset-flow": "^7.9.0", "http-proxy-middleware": "^1.0.0", - "react-query-devtools": "^1.1.5", + "react-query-devtools": "^2.1.1", "redux-devtools": "^3.5.0" }, "jest": { diff --git a/client/public/favicon.ico b/client/public/favicon.ico deleted file mode 100644 index bcd5dfd67..000000000 Binary files a/client/public/favicon.ico and /dev/null differ diff --git a/client/public/favicons/favicon-32.ico b/client/public/favicons/favicon-32.ico new file mode 100644 index 000000000..cff6d2720 Binary files /dev/null and b/client/public/favicons/favicon-32.ico differ diff --git a/client/public/index.html b/client/public/index.html index 68c21886a..abbfd9917 100644 --- a/client/public/index.html +++ b/client/public/index.html @@ -2,14 +2,14 @@ - + - + - React App + Bigcapital @@ -41,7 +41,7 @@ To create a production bundle, use `npm run build` or `yarn build`. --> - + diff --git a/client/src/components/AccountsSelectList.js b/client/src/components/AccountsSelectList.js index 374010f77..e037a7aad 100644 --- a/client/src/components/AccountsSelectList.js +++ b/client/src/components/AccountsSelectList.js @@ -27,11 +27,29 @@ export default function AccountsSelectList({ onAccountSelected && onAccountSelected(account); }, [setSelectedAccount, onAccountSelected]); + // Filters accounts items. + const filterAccountsPredicater = useCallback( + (query, account, _index, exactMatch) => { + const normalizedTitle = account.name.toLowerCase(); + const normalizedQuery = query.toLowerCase(); + + if (exactMatch) { + return normalizedTitle === normalizedQuery; + } else { + return ( + `${account.code} ${normalizedTitle}`.indexOf(normalizedQuery) >= 0 + ); + } + }, + [], + ); + return (