mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
Adding Packages - downshift and recent searches and basic code
This commit is contained in:
parent
386a47b73b
commit
04acffd668
2 changed files with 12 additions and 7 deletions
|
|
@ -10,8 +10,10 @@ export type LibrarySearchBarProps = {
|
|||
coordinator: SearchCoordinator
|
||||
}
|
||||
|
||||
|
||||
export function LibrarySearchBar(props: LibrarySearchBarProps): JSX.Element {
|
||||
const [searchTerm, setSearchTerm] = useState('')
|
||||
const [searchTerm, setSearchTerm] = useState('')
|
||||
const [recentSearches, setRecentSearches] = useState(Array<any>([]))
|
||||
|
||||
return (
|
||||
<>
|
||||
|
|
@ -62,10 +64,10 @@ export function LibrarySearchBar(props: LibrarySearchBarProps): JSX.Element {
|
|||
<Button
|
||||
style="plainIcon"
|
||||
onClick={(event) => {
|
||||
// event.preventDefault()
|
||||
// setSearchTerm('')
|
||||
// props.applySearchQuery('')
|
||||
// inputRef.current?.blur()
|
||||
event.preventDefault()
|
||||
setSearchTerm('')
|
||||
//props.applySearchQuery('')
|
||||
// inputRef.current?.blur()
|
||||
}}
|
||||
css={{
|
||||
display: 'flex',
|
||||
|
|
@ -85,8 +87,9 @@ export function LibrarySearchBar(props: LibrarySearchBarProps): JSX.Element {
|
|||
<Button
|
||||
style="ctaDarkYellow"
|
||||
onClick={(event) => {
|
||||
// event.preventDefault()
|
||||
// setSearchTerm('')
|
||||
event.preventDefault()
|
||||
console.log(searchTerm)
|
||||
setSearchTerm(searchTerm)
|
||||
// props.applySearchQuery('')
|
||||
// inputRef.current?.blur()
|
||||
}}
|
||||
|
|
|
|||
|
|
@ -32,6 +32,7 @@
|
|||
"color2k": "^2.0.0",
|
||||
"cookie": "^0.5.0",
|
||||
"diff-match-patch": "^1.0.5",
|
||||
"downshift": "^6.1.9",
|
||||
"graphql-request": "^3.6.1",
|
||||
"kbar": "^0.1.0-beta.35",
|
||||
"nanoid": "^3.1.29",
|
||||
|
|
@ -48,6 +49,7 @@
|
|||
"react-super-responsive-table": "^5.2.1",
|
||||
"react-topbar-progress-indicator": "^4.1.1",
|
||||
"react-twitter-widgets": "^1.10.0",
|
||||
"recent-searches": "^1.0.5",
|
||||
"swr": "^1.0.1",
|
||||
"uuid": "^8.3.2"
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in a new issue