Skip to content

Commit

Permalink
Merge branch 'release/v0.8.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
Luphia1984 committed Sep 20, 2024
2 parents b2f0c4d + d46dd61 commit 1f94838
Showing 1 changed file with 25 additions and 24 deletions.
49 changes: 25 additions & 24 deletions src/components/filter_section/search_input.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,30 +11,31 @@ const SearchInput: React.FC<SearchInputProps> = ({ searchQuery, onSearchChange }
const { t } = useTranslation(['common']);
return (
<div className="mt-28px flex min-w-200px flex-1 flex-col">
<label htmlFor="search" className="text-sm font-medium text-gray-500">
<div className="relative flex-1">
<input
type="text"
id="search"
className={`relative flex h-44px w-full items-center justify-between rounded-sm border border-input-stroke-input bg-input-surface-input-background p-10px outline-none`}
placeholder={t('common:COMMON.SEARCH')}
defaultValue={searchQuery}
onKeyDown={(e) => {
if (e.key === 'Enter' && !e.nativeEvent.isComposing) {
onSearchChange(e.currentTarget.value);
}
}}
/>
<FiSearch
size={20}
className="absolute right-3 top-3 cursor-pointer"
onClick={() => {
const query = (document.getElementById('search') as HTMLInputElement)?.value;
onSearchChange(query);
}}
/>
</div>
</label>
<div className="relative flex-1">
<label htmlFor="search" className="text-sm font-medium text-gray-500">
{t('common:COMMON.SEARCH')}
</label>
<input
type="text"
id="search"
className={`relative flex h-44px w-full items-center justify-between rounded-sm border border-input-stroke-input bg-input-surface-input-background p-10px outline-none`}
placeholder={t('common:COMMON.SEARCH')}
defaultValue={searchQuery}
onKeyDown={(e) => {
if (e.key === 'Enter' && !e.nativeEvent.isComposing) {
onSearchChange(e.currentTarget.value);
}
}}
/>
<FiSearch
size={20}
className="absolute right-3 top-3 cursor-pointer"
onClick={() => {
const query = (document.getElementById('search') as HTMLInputElement)?.value;
onSearchChange(query);
}}
/>
</div>
</div>
);
};
Expand Down

0 comments on commit 1f94838

Please sign in to comment.