-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c105193
commit c95940f
Showing
11 changed files
with
73 additions
and
172 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 |
---|---|---|
@@ -1,5 +1,4 @@ | ||
{ | ||
"Search": "Search", | ||
"Priority": "Priority", | ||
"State": "State", | ||
"Owner": "Owner", | ||
|
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 |
---|---|---|
@@ -1,5 +1,4 @@ | ||
{ | ||
"Search": "Поиск", | ||
"Priority": "Приоритет", | ||
"State": "Статус", | ||
"Owner": "Ответственный", | ||
|
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
{ | ||
"Search or jump to...": "Search or jump to...", | ||
"Search...": "", | ||
"Goals": "", | ||
"Projects": "" | ||
} |
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
{ | ||
"Search or jump to...": "Найти и/или перейти...", | ||
"Search...": "Поиск...", | ||
"Goals": "Цели", | ||
"Projects": "Проекты" | ||
} |
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,14 @@ | ||
.GroupHeader { | ||
display: flex; | ||
align-items: center; | ||
justify-content: space-between; | ||
|
||
box-sizing: border-box; | ||
|
||
padding-bottom: var(--gap-xs); | ||
margin: 0 var(--gap-s); | ||
|
||
max-width: 392px; | ||
|
||
border-bottom: 1px solid var(--gray-900); | ||
} |
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
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 |
---|---|---|
@@ -1,27 +1,18 @@ | ||
import { FC, useCallback } from 'react'; | ||
import { FC } from 'react'; | ||
import { debounce } from 'throttle-debounce'; | ||
import { FormControl, FormControlInput } from '@taskany/bricks/harmony'; | ||
import { FormControl } from '@taskany/bricks/harmony'; | ||
|
||
import { FilterAutoCompleteInput } from './FilterAutoCompleteInput/FilterAutoCompleteInput'; | ||
|
||
export const SearchFilter: FC<{ | ||
placeholder?: string; | ||
defaultValue?: string; | ||
onChange: (search: string) => void; | ||
}> = ({ placeholder, defaultValue, onChange }) => { | ||
}> = ({ defaultValue, onChange }) => { | ||
const debouncedSearchHandler = debounce(200, onChange); | ||
|
||
const onSearchInputChange = useCallback( | ||
(e: React.ChangeEvent<HTMLInputElement>) => debouncedSearchHandler(e.currentTarget.value), | ||
[debouncedSearchHandler], | ||
); | ||
return ( | ||
<FormControl> | ||
<FormControlInput | ||
outline | ||
size="xs" | ||
placeholder={placeholder} | ||
defaultValue={defaultValue} | ||
onChange={onSearchInputChange} | ||
/> | ||
<FilterAutoCompleteInput defaultValue={defaultValue} onChange={debouncedSearchHandler} /> | ||
</FormControl> | ||
); | ||
}; |