Skip to content
This repository has been archived by the owner on Dec 30, 2022. It is now read-only.

fix(SearchBox): use hidden over style to hide loader #714

Merged
merged 2 commits into from
Dec 12, 2017
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
11 changes: 2 additions & 9 deletions packages/react-instantsearch/src/components/SearchBox.js
Original file line number Diff line number Diff line change
Expand Up @@ -277,21 +277,14 @@ class SearchBox extends Component {
{...cx('input')}
/>
{this.props.showLoadingIndicator && (
<div
style={{
display: isSearchStalled ? 'block' : 'none',
}}
{...cx('loading-indicator')}
>
<div hidden={!isSearchStalled} {...cx('loading-indicator')}>
{loadingIndicatorComponent}
</div>
)}
<button
type="submit"
title={translate('submitTitle')}
style={{
display: isSearchStalled ? 'none' : 'block',
}}
hidden={isSearchStalled}
{...cx('submit')}
>
{submitComponent}
Expand Down