Revert "expand search bar when typing on mobile"
This reverts commit 43b1096313
.
This commit is contained in:
parent
480b3e7c54
commit
d063e209dd
|
@ -22,7 +22,6 @@ import { Spacer } from './layout/spacer'
|
||||||
import { ENV, IS_PRIVATE_MANIFOLD } from 'common/envs/constants'
|
import { ENV, IS_PRIVATE_MANIFOLD } from 'common/envs/constants'
|
||||||
import { trackCallback } from 'web/lib/service/analytics'
|
import { trackCallback } from 'web/lib/service/analytics'
|
||||||
import ContractSearchFirestore from 'web/pages/contract-search-firestore'
|
import ContractSearchFirestore from 'web/pages/contract-search-firestore'
|
||||||
import { useWindowSize } from 'web/hooks/use-window-size'
|
|
||||||
|
|
||||||
const searchClient = algoliasearch(
|
const searchClient = algoliasearch(
|
||||||
'GJQPAYENIF',
|
'GJQPAYENIF',
|
||||||
|
@ -105,10 +104,6 @@ export function ContractSearch(props: {
|
||||||
|
|
||||||
const indexName = `${indexPrefix}contracts-${sort}`
|
const indexName = `${indexPrefix}contracts-${sort}`
|
||||||
|
|
||||||
const [isSearching, setIsSearching] = useState(false)
|
|
||||||
const { width } = useWindowSize()
|
|
||||||
const showOptions = !isSearching || (width ?? 0) >= 500
|
|
||||||
|
|
||||||
if (IS_PRIVATE_MANIFOLD || process.env.NEXT_PUBLIC_FIREBASE_EMULATE) {
|
if (IS_PRIVATE_MANIFOLD || process.env.NEXT_PUBLIC_FIREBASE_EMULATE) {
|
||||||
return (
|
return (
|
||||||
<ContractSearchFirestore
|
<ContractSearchFirestore
|
||||||
|
@ -127,38 +122,29 @@ export function ContractSearch(props: {
|
||||||
classNames={{
|
classNames={{
|
||||||
form: 'before:top-6',
|
form: 'before:top-6',
|
||||||
input: '!pl-10 !input !input-bordered shadow-none w-[100px]',
|
input: '!pl-10 !input !input-bordered shadow-none w-[100px]',
|
||||||
resetIcon: 'mt-2 sm:flex',
|
resetIcon: 'mt-2 hidden sm:flex',
|
||||||
}}
|
}}
|
||||||
onFocus={() => setIsSearching(true)}
|
|
||||||
onBlur={() => setIsSearching(false)}
|
|
||||||
/>
|
/>
|
||||||
|
<select
|
||||||
{showOptions && (
|
className="!select !select-bordered"
|
||||||
<>
|
value={filter}
|
||||||
<select
|
onChange={(e) => setFilter(e.target.value as filter)}
|
||||||
className="!select !select-bordered"
|
onBlur={trackCallback('select search filter')}
|
||||||
value={filter}
|
>
|
||||||
onChange={(e) => setFilter(e.target.value as filter)}
|
<option value="open">Open</option>
|
||||||
onBlur={trackCallback('select search filter')}
|
<option value="closed">Closed</option>
|
||||||
>
|
<option value="resolved">Resolved</option>
|
||||||
<option value="open">Open</option>
|
<option value="all">All</option>
|
||||||
<option value="closed">Closed</option>
|
</select>
|
||||||
<option value="resolved">Resolved</option>
|
{!hideOrderSelector && (
|
||||||
<option value="all">All</option>
|
<SortBy
|
||||||
</select>
|
items={sortIndexes}
|
||||||
|
classNames={{
|
||||||
{!hideOrderSelector && (
|
select: '!select !select-bordered',
|
||||||
<SortBy
|
}}
|
||||||
items={sortIndexes}
|
onBlur={trackCallback('select search sort')}
|
||||||
classNames={{
|
/>
|
||||||
select: '!select !select-bordered',
|
|
||||||
}}
|
|
||||||
onBlur={trackCallback('select search sort')}
|
|
||||||
/>
|
|
||||||
)}
|
|
||||||
</>
|
|
||||||
)}
|
)}
|
||||||
|
|
||||||
<Configure
|
<Configure
|
||||||
facetFilters={filters}
|
facetFilters={filters}
|
||||||
numericFilters={numericFilters}
|
numericFilters={numericFilters}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user