Skip to content

Commit a502490

Browse files
authored
Merge pull request #484 from datacite/disable-incremental-search
Disable incremental search
2 parents 4bf3f65 + 1c5b862 commit a502490

File tree

3 files changed

+28
-13
lines changed

3 files changed

+28
-13
lines changed

package.json

-1
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,6 @@
7272
"sass": "^1.49.0",
7373
"swr": "^0.3.2",
7474
"urijs": "^1.19.11",
75-
"use-debounce": "^10.0.0",
7675
"vega": "^5.30.0",
7776
"vega-embed": "^6.25.0",
7877
"vega-lite": "^5.19.0",

src/components/Header/Search.tsx

-4
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
import React, { useState } from 'react'
44
import { useSearchParams, useRouter, usePathname } from 'next/navigation'
5-
import { useDebouncedCallback } from 'use-debounce';
65
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
76
import { faTimes, faSearch } from '@fortawesome/free-solid-svg-icons'
87
import InputGroup from 'react-bootstrap/InputGroup'
@@ -39,8 +38,6 @@ export default function Search() {
3938
router.push(`${base}?${params.toString()}`);
4039
}
4140

42-
const debounceSearch = useDebouncedCallback(search, 500)
43-
4441
return (
4542
<InputGroup className="flex-nowrap align-items-center">
4643
<input
@@ -49,7 +46,6 @@ export default function Search() {
4946
value={searchInput}
5047
onChange={e => {
5148
setSearchInput(e.target.value)
52-
debounceSearch(e.target.value)
5349
}}
5450
key="searchInput"
5551
className={`form-control ${styles.input}`}

yarn.lock

+28-8
Original file line numberDiff line numberDiff line change
@@ -8266,7 +8266,16 @@ streamsearch@^1.1.0:
82668266
resolved "https://registry.yarnpkg.com/streamsearch/-/streamsearch-1.1.0.tgz#404dd1e2247ca94af554e841a8ef0eaa238da764"
82678267
integrity sha512-Mcc5wHehp9aXz1ax6bZUyY5afg9u2rv5cqQI3mRrYkGC8rW2hM02jWuwjtL++LS5qinSyhj2QfLyNsuc+VsExg==
82688268

8269-
"string-width-cjs@npm:string-width@^4.2.0", "string-width@^1.0.2 || 2 || 3 || 4", string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3:
8269+
"string-width-cjs@npm:string-width@^4.2.0":
8270+
version "4.2.3"
8271+
resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010"
8272+
integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==
8273+
dependencies:
8274+
emoji-regex "^8.0.0"
8275+
is-fullwidth-code-point "^3.0.0"
8276+
strip-ansi "^6.0.1"
8277+
8278+
"string-width@^1.0.2 || 2 || 3 || 4", string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3:
82708279
version "4.2.3"
82718280
resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010"
82728281
integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==
@@ -8361,7 +8370,14 @@ string_decoder@~1.1.1:
83618370
dependencies:
83628371
safe-buffer "~5.1.0"
83638372

8364-
"strip-ansi-cjs@npm:strip-ansi@^6.0.1", strip-ansi@6.0.1, strip-ansi@^6.0.0, strip-ansi@^6.0.1:
8373+
"strip-ansi-cjs@npm:strip-ansi@^6.0.1":
8374+
version "6.0.1"
8375+
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9"
8376+
integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==
8377+
dependencies:
8378+
ansi-regex "^5.0.1"
8379+
8380+
strip-ansi@6.0.1, strip-ansi@^6.0.0, strip-ansi@^6.0.1:
83658381
version "6.0.1"
83668382
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9"
83678383
integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==
@@ -8990,11 +9006,6 @@ url@~0.11.0:
89909006
punycode "^1.4.1"
89919007
qs "^6.12.3"
89929008

8993-
use-debounce@^10.0.0:
8994-
version "10.0.4"
8995-
resolved "https://registry.yarnpkg.com/use-debounce/-/use-debounce-10.0.4.tgz#2135be498ad855416c4495cfd8e0e130bd33bb24"
8996-
integrity sha512-6Cf7Yr7Wk7Kdv77nnJMf6de4HuDE4dTxKij+RqE9rufDsI6zsbjyAxcH5y2ueJCQAnfgKbzXbZHYlkFwmBlWkw==
8997-
89989009
util-deprecate@^1.0.1, util-deprecate@~1.0.1:
89999010
version "1.0.2"
90009011
resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf"
@@ -9593,7 +9604,7 @@ word-wrap@^1.2.5:
95939604
resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.5.tgz#d2c45c6dd4fbce621a66f136cbe328afd0410b34"
95949605
integrity sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==
95959606

9596-
"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0", wrap-ansi@^7.0.0:
9607+
"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0":
95979608
version "7.0.0"
95989609
resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43"
95999610
integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==
@@ -9611,6 +9622,15 @@ wrap-ansi@^6.2.0:
96119622
string-width "^4.1.0"
96129623
strip-ansi "^6.0.0"
96139624

9625+
wrap-ansi@^7.0.0:
9626+
version "7.0.0"
9627+
resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43"
9628+
integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==
9629+
dependencies:
9630+
ansi-styles "^4.0.0"
9631+
string-width "^4.1.0"
9632+
strip-ansi "^6.0.0"
9633+
96149634
wrap-ansi@^8.1.0:
96159635
version "8.1.0"
96169636
resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-8.1.0.tgz#56dc22368ee570face1b49819975d9b9a5ead214"

0 commit comments

Comments
 (0)