-
Notifications
You must be signed in to change notification settings - Fork 140
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #16654 from Nexus-Mods/fblo-search-bar
added search bar to FBLO
- Loading branch information
Showing
3 changed files
with
53 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
/* eslint-disable */ | ||
import React from 'react'; | ||
import { FormInput } from 'vortex-api'; | ||
import { useTranslation } from 'react-i18next'; | ||
|
||
interface IProps { | ||
currentFilterValue: string; | ||
setFilter(value: string): void; | ||
} | ||
|
||
const FilterBox: React.FC<IProps> = ({ currentFilterValue, setFilter }) => { | ||
const [t] = useTranslation('common'); | ||
const applyFilter = React.useCallback((value: string) => setFilter(value), [setFilter]); | ||
return ( | ||
<FormInput | ||
type='search' | ||
id='file-based-load-order-filter' | ||
className='file-based-load-order-filter' | ||
value={currentFilterValue} | ||
placeholder={t('Search for a specific load order entry...')} | ||
onChange={applyFilter} | ||
debounceTimer={100} | ||
clearable | ||
/> | ||
); | ||
} | ||
|
||
export default FilterBox; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters