mirror of
https://github.com/ragestudio/comty.git
synced 2025-06-09 10:34:17 +00:00
cancel debounce if search is empty
This commit is contained in:
parent
a11c061f52
commit
29aa0c7a2c
@ -55,6 +55,8 @@ const ResultsTypeDecorators = {
|
||||
const Results = (props) => {
|
||||
let { results } = props
|
||||
|
||||
console.log("results", results, typeof results)
|
||||
|
||||
if (typeof results !== "object") {
|
||||
return null
|
||||
}
|
||||
@ -190,6 +192,8 @@ export default (props) => {
|
||||
setSearchValue(e.target.value)
|
||||
|
||||
if (e.target.value === "") {
|
||||
debounceSearch.cancel()
|
||||
|
||||
if (props.useUrlQuery) {
|
||||
setQuery(null)
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user