Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Including classes on searchBar to identify when is open and/or filled #792

Merged
merged 6 commits into from
Jun 17, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions react/components/SearchBar/components/SearchBar.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import styles from '../styles.css'
import AutocompleteResults from '../../AutocompleteResults'
import AutocompleteInput from './AutocompleteInput'

const CSS_HANDLES = ['searchBarInnerContainer']
const CSS_HANDLES = ['searchBarInnerContainer', 'open', 'hasTerm']
const SEARCH_DELAY_TIME = 500
const AUTCOMPLETE_EXTENSION_ID = 'autocomplete-result-list'

Expand Down Expand Up @@ -186,7 +186,9 @@ const SearchBar = ({
<div
className={classNames(
'relative-m w-100',
handles.searchBarInnerContainer
handles.searchBarInnerContainer,
isOpen ? handles.open : '',
inputValue !== '' ? handles.hasTerm : ''
)}
>
<AutocompleteInput
Expand Down